diff --git a/install/checkConfiguration.php b/install/checkConfiguration.php index c14a49c22..e5fdd4c5b 100644 --- a/install/checkConfiguration.php +++ b/install/checkConfiguration.php @@ -1,240 +1,240 @@ post = $_POST; if (!file_exists($_POST['systemRootPath'] . "index.php")) { $obj->error = "Your system path to application ({$_POST['systemRootPath']}) is wrong"; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $mysqli = @new mysqli($_POST['databaseHost'], $_POST['databaseUser'], $_POST['databasePass'], "", $_POST['databasePort']); /* * This is the "official" OO way to do it, * BUT $connect_error was broken until PHP 5.2.9 and 5.3.0. */ if ($mysqli->connect_error) { $obj->error = ('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error); echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); if ($_POST['createTables'] == 2) { $sql = "CREATE DATABASE IF NOT EXISTS {$_POST['databaseName']}"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error creating database: " . $mysqli->error; echo json_encode($obj); exit; } } $mysqli->select_db($_POST['databaseName']); error_log("Installation: ".__LINE__); /* $cmd = "mysql -h {$_POST['databaseHost']} -u {$_POST['databaseUser']} -p {$_POST['databasePass']} {$_POST['databaseName']} < {$_POST['systemRootPath']}install/database.sql"; exec("{$cmd} 2>&1", $output, $return_val); if ($return_val !== 0) { $obj->error = "Error on command: {$cmd}"; echo json_encode($obj); exit; } */ error_log("Installation: ".__LINE__); if ($_POST['createTables'] > 0) { error_log("Installation: ".__LINE__); // Temporary variable, used to store current query $templine = ''; $installFile = "{$_POST['systemRootPath']}install/database.sql"; if(!file_exists($installFile)){ $obj->error = "File Not found {$installFile}"; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); // Read in entire file $lines = file($installFile); if(empty($lines)){ $obj->error = "File is empty {$installFile}"; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); // Loop through each line $obj->error = ""; foreach ($lines as $line) { // Skip it if it's a comment if (substr($line, 0, 2) == '--' || $line == '') continue; // Add this line to the current segment $templine .= $line; // If it has a semicolon at the end, it's the end of the query if (substr(trim($line), -1, 1) == ';') { // Perform the query //error_log("Installation: ".$templine); if (!$mysqli->query($templine)) { error_log("Installation: SQL ERROR ".$mysqli->error); $obj->error = ('Error performing query \'' . $templine . '\': ' . $mysqli->error . '

'); } // Reset temp variable to empty $templine = ''; } } error_log("Installation: ".__LINE__); } error_log("Installation: ".__LINE__); $sql = "DELETE FROM users WHERE id = 1 "; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error deleting user: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $sql = "INSERT INTO users (id, user, email, password, created, modified, isAdmin) VALUES (1, 'admin', '" . $_POST['contactEmail'] . "', '" . md5($_POST['systemAdminPass']) . "', now(), now(), true)"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error creating admin user: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $sql = "DELETE FROM categories WHERE id = 1 "; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error deleting category: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $sql = "INSERT INTO categories (id, name, clean_name, description, created, modified) VALUES (1, 'Default', 'default','', now(), now())"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error creating category: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $sql = "DELETE FROM configurations WHERE id = 1 "; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error deleting configuration: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $encoder = 'https://encoder1.avideo.com/'; if(is_dir("{$_POST['systemRootPath']}Encoder")){ $encoder = "{$_POST['webSiteRootURL']}Encoder/"; } $sql = "INSERT INTO configurations (id, video_resolution, users_id, version, webSiteTitle, language, contactEmail, encoderURL, created, modified) " . " VALUES " . " (1, '858:480', 1,'{$installationVersion}', '{$_POST['webSiteTitle']}', '{$_POST['mainLanguage']}', '{$_POST['contactEmail']}', '{$encoder}', now(), now())"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error creating configuration: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $sql = "INSERT INTO `plugins` VALUES (NULL, 'a06505bf-3570-4b1f-977a-fd0e5cab205d', 'active', now(), now(), '', 'Gallery', 'Gallery', '1.0');"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error enabling Gallery Plugin: " . $mysqli->error; echo json_encode($obj); exit; } error_log("Installation: ".__LINE__); $mysqli->close(); if(empty($_POST['salt'])){ $_POST['salt'] = uniqid(); } $content = "error = "Error copying the encoding progress sample files. Check whether the directory {$_POST['systemRootPath']}videos/ exists and the process have permission"; echo json_encode($obj); exit; } */ error_log("Installation: ".__LINE__); $obj->success = true; echo json_encode($obj); error_log("Installation: ".__LINE__); \ No newline at end of file diff --git a/install/database.sql b/install/database.sql index 5a06429e6..8bc5a52b8 100644 --- a/install/database.sql +++ b/install/database.sql @@ -1,588 +1,590 @@ -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Table `users` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `users` ( `id` INT NOT NULL AUTO_INCREMENT, `user` VARCHAR(45) NOT NULL, `name` VARCHAR(45) NULL, `email` VARCHAR(254) NULL, `password` VARCHAR(145) NOT NULL, `created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified` DATETIME NOT NULL, `isAdmin` TINYINT(1) NOT NULL DEFAULT 0, `status` ENUM('a', 'i') NOT NULL DEFAULT 'a', `photoURL` VARCHAR(255) NULL, `lastLogin` DATETIME NULL, `recoverPass` VARCHAR(255) NULL, `backgroundURL` VARCHAR(255) NULL, `canStream` TINYINT(1) NULL, `canUpload` TINYINT(1) NULL, `canCreateMeet` TINYINT(1) NULL, `canViewChart` TINYINT(1) NOT NULL DEFAULT 0, `about` TEXT NULL, `channelName` VARCHAR(45) NULL, `emailVerified` TINYINT(1) NOT NULL DEFAULT 0, `analyticsCode` VARCHAR(45) NULL DEFAULT NULL, `externalOptions` TEXT NULL, `first_name` VARCHAR(255) NULL DEFAULT NULL, `last_name` VARCHAR(255) NULL DEFAULT NULL, `address` VARCHAR(255) NULL DEFAULT NULL, `zip_code` VARCHAR(45) NULL DEFAULT NULL, `country` VARCHAR(100) NULL DEFAULT NULL, `region` VARCHAR(100) NULL DEFAULT NULL, `city` VARCHAR(100) NULL DEFAULT NULL, `donationLink` VARCHAR(225) NULL DEFAULT NULL, `extra_info` TEXT NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `user_UNIQUE` (`user` ASC)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `users_blob` ( `id` INT NOT NULL AUTO_INCREMENT, `blob` LONGBLOB NULL, `users_id` INT NOT NULL, `created` DATETIME NULL, `modified` DATETIME NULL, `type` VARCHAR(45) NULL, PRIMARY KEY (`id`), INDEX `fk_users_document_image_users1_idx` (`users_id` ASC), CONSTRAINT `fk_users_document_image_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `categories` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `categories` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, `clean_name` VARCHAR(45) NOT NULL, `description` TEXT NULL, `nextVideoOrder` INT(2) NOT NULL DEFAULT '0', `parentId` INT NOT NULL DEFAULT '0', `created` DATETIME NOT NULL, `modified` DATETIME NOT NULL, `iconClass` VARCHAR(45) NOT NULL DEFAULT 'fa fa-folder', `users_id` INT(11) NOT NULL DEFAULT 1, `private` TINYINT(1) NULL DEFAULT 0, `allow_download` TINYINT(1) NULL DEFAULT 1, `order` INT(11) NULL DEFAULT NULL, + `suggested` TINYINT(1) NULL DEFAULT NULL, PRIMARY KEY (`id`), INDEX `fk_categories_users1_idx` (`users_id` ASC), INDEX `clean_name_INDEX2` (`clean_name` ASC), INDEX `sortcategoryOrderIndex` (`order` ASC), INDEX `category_name_idx` (`name` ASC), + INDEX `categoriesindex9suggested` (`suggested` ASC), FULLTEXT INDEX `index7cname` (`name`), FULLTEXT INDEX `index8cdescr` (`description`), UNIQUE INDEX `clean_name_UNIQUE` (`clean_name` ASC), CONSTRAINT `fk_categories_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `sites` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(255) NULL DEFAULT NULL, `url` VARCHAR(255) NOT NULL, `created` DATETIME NULL DEFAULT NULL, `modified` DATETIME NULL DEFAULT NULL, `status` CHAR(1) NULL DEFAULT NULL, `secret` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `videos` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `videos` ( `id` INT NOT NULL AUTO_INCREMENT, `title` VARCHAR(190) NOT NULL, `clean_title` VARCHAR(190) NOT NULL, `description` TEXT NULL, `views_count` INT NOT NULL DEFAULT 0, `views_count_25` INT(11) NULL DEFAULT 0, `views_count_50` INT(11) NULL DEFAULT 0, `views_count_75` INT(11) NULL DEFAULT 0, `views_count_100` INT(11) NULL DEFAULT 0, `status` VARCHAR(16) NOT NULL DEFAULT 'e' , `created` DATETIME NOT NULL, `modified` DATETIME NOT NULL, `users_id` INT NOT NULL, `categories_id` INT NOT NULL, `filename` VARCHAR(255) NOT NULL, `duration` VARCHAR(15) NOT NULL, `type` ENUM('audio', 'video', 'embed', 'linkVideo', 'linkAudio', 'torrent', 'pdf', 'image', 'gallery', 'article', 'serie', 'zip') NOT NULL DEFAULT 'video', `videoDownloadedLink` VARCHAR(255) NULL, `order` INT UNSIGNED NOT NULL DEFAULT 1, `rotation` SMALLINT NULL DEFAULT 0, `zoom` FLOAT NULL DEFAULT 1, `youtubeId` VARCHAR(45) NULL, `videoLink` VARCHAR(255) NULL, `next_videos_id` INT NULL, `isSuggested` INT(1) NOT NULL DEFAULT 0, `trailer1` VARCHAR(255) NULL DEFAULT NULL, `trailer2` VARCHAR(255) NULL DEFAULT NULL, `trailer3` VARCHAR(255) NULL DEFAULT NULL, `rate` FLOAT(4,2) NULL DEFAULT NULL, `can_download` TINYINT(1) NULL DEFAULT NULL, `can_share` TINYINT(1) NULL DEFAULT NULL, `rrating` VARCHAR(45) NULL DEFAULT NULL, `externalOptions` TEXT NULL DEFAULT NULL, `only_for_paid` TINYINT(1) NULL DEFAULT NULL, `serie_playlists_id` INT(11) NULL DEFAULT NULL, `sites_id` INT(11) NULL, `video_password` VARCHAR(45) NULL DEFAULT NULL, `encoderURL` VARCHAR(255) NULL DEFAULT NULL, `filepath` VARCHAR(255) NULL DEFAULT NULL, `filesize` BIGINT(19) UNSIGNED NULL DEFAULT 0, `live_transmitions_history_id` INT(11) NULL DEFAULT NULL, PRIMARY KEY (`id`), INDEX `fk_videos_users_idx` (`users_id` ASC), INDEX `fk_videos_categories1_idx` (`categories_id` ASC), UNIQUE INDEX `clean_title_UNIQUE` (`clean_title` ASC), INDEX `index5` (`order` ASC), INDEX `fk_videos_videos1_idx` (`next_videos_id` ASC), INDEX `fk_videos_sites1_idx` (`sites_id` ASC), INDEX `clean_title_INDEX` (`clean_title` ASC), INDEX `video_filename_INDEX` (`filename` ASC), INDEX `video_status_idx` (`status` ASC), INDEX `video_type_idx` (`type` ASC) , INDEX `fk_videos_live_transmitions_history1_idx` (`live_transmitions_history_id` ASC), FULLTEXT INDEX `index17vname` (`title`), FULLTEXT INDEX `index18vdesc` (`description`), CONSTRAINT `fk_videos_sites1` FOREIGN KEY (`sites_id`) REFERENCES `sites` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_videos_users` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_videos_categories1` FOREIGN KEY (`categories_id`) REFERENCES `categories` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_videos_videos1` FOREIGN KEY (`next_videos_id`) REFERENCES `videos` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_videos_playlists1` FOREIGN KEY (`serie_playlists_id`) REFERENCES `playlists` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `videos_metadata` ( `id` INT NOT NULL AUTO_INCREMENT, `videos_id` INT NOT NULL, `resolution` VARCHAR(12) NOT NULL, `format` VARCHAR(12) NOT NULL, `stream_id` INT NOT NULL, `name` VARCHAR(128) NOT NULL, `value` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE (`videos_id`, `resolution`, `format`, `stream_id`, `name`), INDEX `fk_videos_metadata_videos1_idx` (`videos_id` ASC), CONSTRAINT `fk_videos_metadata_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `comments` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `comments` ( `id` INT NOT NULL AUTO_INCREMENT, `comment` TEXT NOT NULL, `videos_id` INT NOT NULL, `users_id` INT NOT NULL, `created` DATETIME NOT NULL, `modified` DATETIME NOT NULL, `comments_id_pai` INT NULL, `pin` INT(1) NOT NULL DEFAULT 0 COMMENT 'If = 1 will be on the top', PRIMARY KEY (`id`), INDEX `fk_comments_videos1_idx` (`videos_id` ASC), INDEX `fk_comments_users1_idx` (`users_id` ASC), INDEX `fk_comments_comments1_idx` (`comments_id_pai` ASC), CONSTRAINT `fk_comments_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_comments_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_comments_comments1` FOREIGN KEY (`comments_id_pai`) REFERENCES `comments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `configurations` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `configurations` ( `id` INT NOT NULL, `video_resolution` VARCHAR(12) NOT NULL, `users_id` INT NOT NULL, `version` VARCHAR(10) NOT NULL, `webSiteTitle` VARCHAR(45) NOT NULL DEFAULT 'AVideo', `language` VARCHAR(6) NOT NULL DEFAULT 'en', `contactEmail` VARCHAR(254) NOT NULL, `modified` DATETIME NOT NULL, `created` DATETIME NOT NULL, `authGoogle_id` VARCHAR(255) NULL, `authGoogle_key` VARCHAR(255) NULL, `authGoogle_enabled` TINYINT(1) NOT NULL DEFAULT 0, `authFacebook_id` VARCHAR(255) NULL, `authFacebook_key` VARCHAR(255) NULL, `authFacebook_enabled` TINYINT(1) NOT NULL DEFAULT 0, `authCanUploadVideos` TINYINT(1) NOT NULL DEFAULT 0, `authCanViewChart` TINYINT(2) NOT NULL DEFAULT 0, `authCanComment` TINYINT(1) NOT NULL DEFAULT 1, `head` TEXT NULL, `logo` VARCHAR(255) NULL, `logo_small` VARCHAR(255) NULL, `adsense` TEXT NULL, `mode` ENUM('Youtube', 'Gallery') NULL DEFAULT 'Youtube', `disable_analytics` TINYINT(1) NULL DEFAULT 0, `disable_youtubeupload` TINYINT(1) NULL DEFAULT 0, `allow_download` TINYINT(1) NULL DEFAULT 0, `session_timeout` INT NULL DEFAULT 3600, `autoplay` TINYINT(1) NULL, `theme` VARCHAR(45) NULL DEFAULT 'default', `smtp` TINYINT(1) NULL, `smtpAuth` TINYINT(1) NULL, `smtpSecure` VARCHAR(255) NULL COMMENT '\'ssl\'; // secure transfer enabled REQUIRED for Gmail', `smtpHost` VARCHAR(255) NULL COMMENT '\"smtp.gmail.com\"', `smtpUsername` VARCHAR(255) NULL COMMENT '\"email@gmail.com\"', `smtpPassword` VARCHAR(255) NULL, `smtpPort` INT NULL, `encoderURL` VARCHAR(255) NULL, PRIMARY KEY (`id`), INDEX `fk_configurations_users1_idx` (`users_id` ASC), CONSTRAINT `fk_configurations_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `videos_statistics` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `videos_statistics` ( `id` INT NOT NULL AUTO_INCREMENT, `when` DATETIME NOT NULL, `ip` VARCHAR(45) NULL, `users_id` INT NULL, `videos_id` INT NOT NULL, `created` DATETIME NULL DEFAULT NULL, `modified` DATETIME NULL DEFAULT NULL, `lastVideoTime` INT(11) NULL DEFAULT NULL, `session_id` VARCHAR(45) NOT NULL, PRIMARY KEY (`id`), INDEX `fk_videos_statistics_users1_idx` (`users_id` ASC), INDEX `fk_videos_statistics_videos1_idx` (`videos_id` ASC), INDEX `when_statisci` (`when` ASC), INDEX `session_id_statistics` (`session_id` ASC), CONSTRAINT `fk_videos_statistics_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_videos_statistics_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `likes` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `likes` ( `id` INT NOT NULL AUTO_INCREMENT, `like` INT(1) NOT NULL DEFAULT 0 COMMENT '1 = Like\n0 = Does not metter\n-1 = Dislike', `created` DATETIME NULL, `modified` DATETIME NULL, `videos_id` INT NOT NULL, `users_id` INT NOT NULL, PRIMARY KEY (`id`), INDEX `fk_likes_videos1_idx` (`videos_id` ASC), INDEX `fk_likes_users1_idx` (`users_id` ASC), INDEX `likes_likes_idx` (`like` ASC), CONSTRAINT `fk_likes_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_likes_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `users_groups` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `users_groups` ( `id` INT NOT NULL AUTO_INCREMENT, `group_name` VARCHAR(255) NULL, `created` DATETIME NULL, `modified` DATETIME NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `users_has_users_groups` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `users_has_users_groups` ( `users_id` INT NOT NULL, `users_groups_id` INT NOT NULL, PRIMARY KEY (`users_id`, `users_groups_id`), INDEX `fk_users_has_users_groups_users_groups1_idx` (`users_groups_id` ASC), INDEX `fk_users_has_users_groups_users1_idx` (`users_id` ASC), UNIQUE INDEX `index_user_groups_unique` (`users_groups_id` ASC, `users_id` ASC), CONSTRAINT `fk_users_has_users_groups_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_users_has_users_groups_users_groups1` FOREIGN KEY (`users_groups_id`) REFERENCES `users_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `videos_group_view` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `videos_group_view` ( `id` INT NOT NULL AUTO_INCREMENT, `users_groups_id` INT NOT NULL, `videos_id` INT NOT NULL, INDEX `fk_videos_group_view_users_groups1_idx` (`users_groups_id` ASC), INDEX `fk_videos_group_view_videos1_idx` (`videos_id` ASC), PRIMARY KEY (`id`), CONSTRAINT `fk_videos_group_view_users_groups1` FOREIGN KEY (`users_groups_id`) REFERENCES `users_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_videos_group_view_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `subscribes` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `subscribes` ( `id` INT NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `status` ENUM('a', 'i') NOT NULL DEFAULT 'a', `created` DATETIME NULL, `modified` DATETIME NULL, `ip` VARCHAR(45) NULL, `users_id` INT NOT NULL DEFAULT 1 COMMENT 'subscribes to user channel', `notify` TINYINT(1) NOT NULL DEFAULT 1, `subscriber_users_id` INT(11) NOT NULL, PRIMARY KEY (`id`), INDEX `fk_subscribes_users1_idx` (`users_id` ASC), INDEX `fk_subscribes_users2_idx` (`subscriber_users_id` ASC), CONSTRAINT `fk_subscribes_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_subscribes_users2` FOREIGN KEY (`subscriber_users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `playlists` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `playlists` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, `created` DATETIME NULL DEFAULT NULL, `modified` DATETIME NULL DEFAULT NULL, `users_id` INT(11) NOT NULL, `status` ENUM('public', 'private', 'unlisted', 'favorite', 'watch_later') NOT NULL DEFAULT 'public', `showOnTV` TINYINT NULL, PRIMARY KEY (`id`), INDEX `fk_playlists_users1_idx` (`users_id` ASC), INDEX `showOnTVindex3` (`showOnTV` ASC), CONSTRAINT `fk_playlists_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `playlists_has_videos` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `playlists_has_videos` ( `playlists_id` INT NOT NULL, `videos_id` INT NOT NULL, `order` INT NULL, PRIMARY KEY (`playlists_id`, `videos_id`), INDEX `fk_playlists_has_videos_videos1_idx` (`videos_id` ASC), INDEX `fk_playlists_has_videos_playlists1_idx` (`playlists_id` ASC), CONSTRAINT `fk_playlists_has_videos_playlists1` FOREIGN KEY (`playlists_id`) REFERENCES `playlists` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_playlists_has_videos_videos1` FOREIGN KEY (`videos_id`) REFERENCES `videos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `plugins` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `plugins` ( `id` INT NOT NULL AUTO_INCREMENT, `uuid` VARCHAR(45) NOT NULL, `status` ENUM('active', 'inactive') NOT NULL DEFAULT 'active', `created` DATETIME NULL, `modified` DATETIME NULL, `object_data` TEXT NULL, `name` VARCHAR(255) NOT NULL, `dirName` VARCHAR(255) NOT NULL, `pluginversion` VARCHAR(6) NULL, PRIMARY KEY (`id`), UNIQUE INDEX `uuid_UNIQUE` (`uuid` ASC)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `comments_likes` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `comments_likes` ( `id` INT NOT NULL AUTO_INCREMENT, `like` INT(1) NOT NULL, `created` DATETIME NULL, `modified` DATETIME NULL, `users_id` INT NOT NULL, `comments_id` INT NOT NULL, PRIMARY KEY (`id`), INDEX `fk_comments_likes_users1_idx` (`users_id` ASC), INDEX `fk_comments_likes_comments1_idx` (`comments_id` ASC), CONSTRAINT `fk_comments_likes_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_comments_likes_comments1` FOREIGN KEY (`comments_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `category_type_cache` -- ----------------------------------------------------- CREATE TABLE `category_type_cache` ( `categoryId` int(11) NOT NULL, `type` int(2) NOT NULL COMMENT '0=both, 1=audio, 2=video' DEFAULT 0, `manualSet` int(1) NOT NULL COMMENT '0=auto, 1=manual' DEFAULT 0 ) ENGINE=InnoDB; CREATE TABLE IF NOT EXISTS `categories_has_users_groups` ( `id` INT NOT NULL AUTO_INCREMENT, `categories_id` INT(11) NOT NULL, `users_groups_id` INT(11) NOT NULL, `created` DATETIME NULL, `modified` DATETIME NULL, `status` CHAR(1) NOT NULL DEFAULT 'a', PRIMARY KEY (`id`), INDEX `fk_categories_has_users_groups_users_groups1_idx` (`users_groups_id` ASC), INDEX `fk_categories_has_users_groups_categories1_idx` (`categories_id` ASC), CONSTRAINT `fk_categories_has_users_groups_categories1` FOREIGN KEY (`categories_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_categories_has_users_groups_users_groups1` FOREIGN KEY (`users_groups_id`) REFERENCES `users_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `users_extra_info` ( `id` INT NOT NULL AUTO_INCREMENT, `field_name` VARCHAR(45) NOT NULL, `field_type` VARCHAR(45) NOT NULL, `field_options` TEXT NULL, `field_default_value` VARCHAR(45) NULL, `parameters` TEXT NULL, `created` DATETIME NULL, `modified` DATETIME NULL, `status` CHAR(1) NOT NULL DEFAULT 'a', `order` INT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), INDEX `ordersortusers_extra_info` USING BTREE (`order`)) ENGINE = InnoDB; ALTER TABLE `category_type_cache` ADD UNIQUE KEY `categoryId` (`categoryId`); ALTER TABLE `plugins` ADD INDEX `plugin_status` (`status` ASC); ALTER TABLE `videos` ADD INDEX `videos_status_index` (`status` ASC), ADD INDEX `is_suggested_index` (`isSuggested` ASC), ADD INDEX `views_count_index` (`views_count` ASC), ADD INDEX `filename_index` (`filename` ASC); COMMIT; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/install/installPluginsTables.php b/install/installPluginsTables.php index ca21e76cf..97b778a4f 100644 --- a/install/installPluginsTables.php +++ b/install/installPluginsTables.php @@ -1,131 +1,132 @@ $value) { $file[$key] = "{$folder}{$dir}/{$value}"; } $fileList = array_merge($fileList, $file); } return $fileList; } $option = intval(@$argv[1]); if(empty($option)){ echo "1 - Install tables and enable plugins\n"; echo "2 - Install tables only\n"; echo "3 - Enable plugins only\n"; echo "4 - Update plugins only\n"; echo "Choose an option: "; ob_flush(); $option = trim(readline("")); } if ($option == 1 || $option == 2) { $files = _rsearch("{$global['systemRootPath']}plugin/", "/install\/install.sql$/i"); $templine = ''; foreach ($files as $value) { $lines = file($value); foreach ($lines as $line) { if (substr($line, 0, 2) == '--' || $line == '') continue; $templine .= $line; if (substr(trim($line), -1, 1) == ';') { if (!$global['mysqli']->query($templine)) { echo ($value . ' Error performing query \'' . $templine . '\': ' . $global['mysqli']->error . '

'); die(json_encode($obj)); } else { echo "Success performing query from $value\n"; } $templine = ''; } } } } if ($option == 1 || $option == 3) { $EnablePlugins = array( array('1apicbec-91db-4357-bb10-ee08b0913778', 'API', 'API'), array('6daca392-7b14-44fb-aa33-51cba620d92e', 'CookieAlert', 'CookieAlert'), array('55a4fa56-8a30-48d4-a0fb-8aa6b3f69033', 'CustomizeAdvanced', 'CustomizeAdvanced'), array('55a4fa56-8a30-48d4-a0fb-8aa6b3fuser3', 'CustomizeUser', 'CustomizeUser'), array('a06505bf-3570-4b1f-977a-fd0e5cab205d', 'Gallery', 'Gallery'), array('e06b161c-cbd0-4c1d-a484-71018efa2f35', 'Live', 'Live'), array('5310b394-b54f-48ab-9049-995df4d95239', 'NextButton', 'NextButton'), array('plist12345-370-4b1f-977a-fd0e5cabtube', 'Programs', 'PlayLists'), array('b5e223db-785b-4436-8f7b-f297860c9be0', 'ReportVideo', 'ReportVideo'), array('f7596843-51b1-47a0-8bb1-b4ad91f87d6b', 'TheaterButton', 'TheaterButton'), array('45432a78-d0c6-47f3-8ac4-8fd05f507386', 'User_Location', 'User_Location'), array('4c1f4f76-b336-4ddc-a4de-184efe715c09', 'MobileManager', 'MobileManager'), array('52chata2-3f14-49db-958e-15ccb1a07f0e', 'Chat2', 'Chat2'), array('cf145581-7d5e-4bb6-8c12-48fc37c0630d', 'LiveUsers', 'LiveUsers'), array('996c9afb-b90e-40ca-90cb-934856180bb9', 'MP4ThumbsAndGif', 'MP4ThumbsAndGif'), array('eb6e2808-d876-4488-94cb-2448a6b14e0b', 'SendRecordedToEncoder', 'SendRecordedToEncoder'), array('f2hls8c6-9359-4cc1-809f-fac32c8a4333', 'VideoHLS', 'VideoHLS'), array('4b9142c0-f0c3-42be-8fe5-a4775111239c', 'VideoResolutionSwitcher', 'VideoResolutionSwitcher'), array('28e74f9a-a2ef-4644-86f0-40234ae7c1b5', 'VideoThumbnails', 'VideoThumbnails'), array('meet225-3807-4167-ba81-0509dd280e06', 'Meet', 'Meet'), - array('YPTSocket-5ee8405eaaa16', 'YPTSocket', 'YPTSocket') + array('YPTSocket-5ee8405eaaa16', 'YPTSocket', 'YPTSocket'), + array('Scheduler-5ee8405eaaa16', 'Scheduler', 'Scheduler') ); foreach ($EnablePlugins as $value) { if ($plugin = Plugin::getOrCreatePluginByName($value[2], 'active')) { echo "Success enable plugin ($value[2]) " . $plugin['name'] . "\n"; } else { echo "ERROR enable plugin ($value[2]) \n"; } } } if ($option == 4) { echo "Searching for {$global['systemRootPath']}plugin/[plugin]/install/install.sql".PHP_EOL; $files = _rsearch("{$global['systemRootPath']}plugin/", "/install\/install.sql$/i"); $templine = ''; foreach ($files as $value) { if(preg_match("/User_Location/", $value)){ continue; } if(preg_match("/Customize/", $value)){ continue; } echo "Checking tables from {$value}".PHP_EOL; $lines = file($value); foreach ($lines as $line) { if (substr($line, 0, 2) == '--' || $line == '') continue; $templine .= $line; if (substr(trim($line), -1, 1) == ';') { if (!$global['mysqli']->query($templine)) { echo ($value . ' Error performing query \'' . $templine . '\': ' . $global['mysqli']->error . '

'); //die(json_encode($obj)); } else { echo "Success performing query from $value\n"; } $templine = ''; } } } $plugins = Plugin::getAvailablePlugins(); foreach ($plugins as $value) { $p = AVideoPlugin::loadPlugin($value->dir); if(empty($p)){ continue; } $currentVersion = $p->getPluginVersion(); if(AVideoPlugin::updatePlugin($value->dir)){ $p = AVideoPlugin::loadPlugin($value->dir, true); $newVersion = $p->getPluginVersion(); echo "{$value->dir} updated FROM {$currentVersion} TO {$newVersion}".PHP_EOL; } } } echo "Option {$option} finished \n"; diff --git a/objects/category.php b/objects/category.php index e6b341903..7e8bf5766 100644 --- a/objects/category.php +++ b/objects/category.php @@ -1,895 +1,871 @@ suggested)?0:1; + } + + function setSuggested($suggested) { + $this->suggested = empty($suggested)?0:1; + } + function getOrder() { return intval($this->order); } function setOrder($order) { $this->order = intval($order); } function getUsers_id() { if (empty($this->users_id)) { $this->users_id = User::getId(); } return $this->users_id; } function getPrivate() { return $this->private; } function setUsers_id($users_id) { // only admin can change owner if (!empty($this->users_id) && !User::isAdmin()) { return false; } $this->users_id = intval($users_id); } function setPrivate($private) { $this->private = empty($private) ? 0 : 1; } function setName($name) { $this->name = $name; } function setClean_name($clean_name) { $clean_name = preg_replace('/\W+/', '-', strtolower(cleanString($clean_name))); $this->clean_name = $clean_name; } function setNextVideoOrder($nextVideoOrder) { $this->nextVideoOrder = $nextVideoOrder; } function setParentId($parentId) { $this->parentId = $parentId; } - /* - function setType($type, $overwriteUserId = 0) { - global $global; - $internalId = $overwriteUserId; - if (empty($internalId)) { - $internalId = $this->id; - } - $exist = false; - // require this cause of Video::autosetCategoryType - but should be moveable easy here.. - require_once dirname(__FILE__) . '/../objects/video.php'; - $sql = "SELECT * FROM `category_type_cache` WHERE categoryId = ?"; - $res = sqlDAL::readSql($sql, "i", array($internalId)); - $catTypeCache = sqlDAL::fetchAssoc($res); - sqlDAL::close($res); - if ($catTypeCache != false) { - $exist = true; - } - - if ($type == "3") { - // auto-cat-type - Video::autosetCategoryType($internalId); - } else { - if ($exist) { - $sql = "UPDATE `category_type_cache` SET `type` = ?, `manualSet` = '1' WHERE `category_type_cache`.`categoryId` = ?;"; - sqlDAL::writeSql($sql, "si", array($type, $internalId)); - } else { - $sql = "INSERT INTO `category_type_cache` (`categoryId`, `type`, `manualSet`) VALUES (?,?,'1')"; - sqlDAL::writeSql($sql, "is", array($internalId, $type)); - } - } - } - * - */ - function setDescription($description) { $this->description = $description; } function __construct($id, $name = '') { if (empty($id)) { // get the category data from category and pass $this->name = $name; } else { $this->id = $id; // get data from id $this->load($id); } } private function load($id) { $row = self::getCategory($id); if (empty($row)) return false; foreach ($row as $key => $value) { $this->$key = $value; } return true; } function loadSelfCategory() { $this->load($this->getId()); } function save($allowOfflineUser = false) { global $global; if (!$allowOfflineUser && !self::canCreateCategory()) { return false; } if (!$allowOfflineUser && !empty($this->id) && !self::userCanEditCategory($this->id)) { return false; } if (empty($this->users_id)) { $this->users_id = User::getId(); } $this->clean_name = self::fixCleanTitle($this->clean_name, 1, $this->id); // check if clean name exists $exists = $this->getCategoryByName($this->clean_name); if (!empty($exists) && $exists['id'] != $this->id) { $this->clean_name .= uniqid(); } $this->nextVideoOrder = intval($this->nextVideoOrder); $this->parentId = intval($this->parentId); if (!empty($this->id)) { $sql = "UPDATE categories SET " . "name = ?," . "clean_name = ?," . "description = ?," . "nextVideoOrder = ?," . "parentId = ?," . "iconClass = ?," . "users_id = ?," + . "suggested = ?," . "`private` = ?, allow_download = ?, `order` = ?, modified = now() WHERE id = ?"; - $format = "sssiisiiiii"; - $values = array($this->name, $this->clean_name, $this->description, $this->nextVideoOrder, $this->parentId, $this->getIconClass(), $this->getUsers_id(), $this->getPrivate(), $this->getAllow_download(), $this->getOrder(), $this->id); + $format = "sssiisiiiiii"; + $values = array($this->name, $this->clean_name, $this->description, intval($this->nextVideoOrder), $this->parentId, $this->getIconClass(), $this->getUsers_id(), $this->getSuggested(), $this->getPrivate(), $this->getAllow_download(), $this->getOrder(), $this->id); } else { $sql = "INSERT INTO categories ( " . "name," . "clean_name," . "description," . "nextVideoOrder," . "parentId," . "iconClass, " . "users_id, " - . "`private`, allow_download, `order`, created, modified) VALUES (?, ?,?,?,?,?,?,?,?,?,now(), now())"; - $format = "sssiisiiii"; - $values = array($this->name, $this->clean_name, $this->description, $this->nextVideoOrder, $this->parentId, $this->getIconClass(), $this->getUsers_id(), $this->getPrivate(), $this->getAllow_download(), $this->getOrder()); + . "suggested, " + . "`private`, allow_download, `order`, created, modified) VALUES (?, ?,?,?,?,?,?,?,?,?,?,now(), now())"; + $format = "sssiisiiiii"; + $values = array($this->name, $this->clean_name, $this->description, intval($this->nextVideoOrder), $this->parentId, $this->getIconClass(), $this->getUsers_id(), $this->getSuggested(), $this->getPrivate(), $this->getAllow_download(), $this->getOrder()); } $insert_row = sqlDAL::writeSql($sql, $format, $values); if ($insert_row) { $_SESSION['user']['sessionCache']['getAllCategoriesClearCache'] = 1; ObjectYPT::deleteALLCache(); if (empty($this->id)) { $id = $global['mysqli']->insert_id; } else { $id = $this->id; } return $id; } else { die($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } } static function fixCleanTitle($clean_title, $count, $id, $original_title = "") { global $global; if (empty($original_title)) { $original_title = $clean_title; } $sql = "SELECT * FROM categories WHERE clean_name = '{$clean_title}' "; if (!empty($id)) { $sql .= " AND id != {$id} "; } $sql .= " LIMIT 1"; $res = sqlDAL::readSql($sql, "", array(), true); $cleanTitleExists = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($cleanTitleExists != false) { return self::fixCleanTitle($original_title . "-" . $count, $count + 1, $id, $original_title); } return $clean_title; } function delete() { if (!self::canCreateCategory()) { return false; } if (!self::userCanEditCategory($this->id)) { return false; } // cannot delete default category if ($this->id == 1) { return false; } global $global; if (!empty($this->id)) { $_SESSION['user']['sessionCache']['getAllCategoriesClearCache'] = 1; $categories_id = self::getSiteCategoryDefaultID(); if ($categories_id) { $sql = "UPDATE videos SET categories_id = ? WHERE categories_id = ?"; sqlDAL::writeSql($sql, "ii", array($categories_id, $this->id)); } $sql = "DELETE FROM categories WHERE id = ?"; } else { return false; } ObjectYPT::deleteALLCache(); self::clearCacheCount(); self::deleteAssets($this->id); return sqlDAL::writeSql($sql, "i", array($this->id)); } static function deleteAssets($categories_id) { $dirPaths = self::getCategoryDirPath($categories_id); return rrmdir($dirPaths['path']); } /* static function getCategoryType($categoryId) { global $global; $sql = "SELECT * FROM `category_type_cache` WHERE categoryId = ?;"; $res = sqlDAL::readSql($sql, "i", array($categoryId)); $data = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { if (!empty($data)) { return $data; } else { return array("categoryId" => "-1", "type" => "0", "manualSet" => "0"); } } else { return array("categoryId" => "-1", "type" => "0", "manualSet" => "0"); } } * */ static function getCategory($id) { global $global; $id = intval($id); $sql = "SELECT * FROM categories WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($result) { $result['name'] = xss_esc_back($result['name']); } return ($res) ? $result : false; } static function getCategoryByName($name) { global $global; $sql = "SELECT * FROM categories WHERE clean_name = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($name)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($result) { $result['name'] = xss_esc_back($result['name']); $result['description_html'] = textToLink(htmlentities($result['description'])); } return ($res) ? $result : false; } static function getOrCreateCategoryByName($name) { $cat = self::getCategoryByName($name); if (empty($cat)) { $obj = new Category(0); $obj->setName($name); $obj->setClean_name($name); $obj->setDescription(""); $obj->setIconClass(""); $obj->setNextVideoOrder(0); $obj->setParentId(0); $id = $obj->save(); return self::getCategoryByName($name); } return $cat; } static function getCategoryDefault() { global $global; $sql = "SELECT * FROM categories ORDER BY id ASC LIMIT 1"; $res = sqlDAL::readSql($sql); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($result) { $result['name'] = xss_esc_back($result['name']); } return ($res) ? $result : false; } static function getSiteCategoryDefaultID() { $obj = AVideoPlugin::getObjectDataIfEnabled("PredefinedCategory"); $id = false; if ($obj) { $id = $obj->defaultCategory; } else { $row = self::getCategoryDefault(); if ($row) { $id = $row['id']; } } return $id; } static function getAllCategories($filterCanAddVideoOnly = false, $onlyWithVideos = false) { global $global, $config; if ($config->currentVersionLowerThen('8.4')) { return false; } $sql = "SELECT * FROM categories c WHERE 1=1 "; if (!empty($_GET['parentsOnly'])) { $sql .= "AND parentId = 0 "; } if ($filterCanAddVideoOnly && !User::isAdmin()) { if (is_int($filterCanAddVideoOnly)) { $users_id = $filterCanAddVideoOnly; } else { $users_id = User::getId(); } if ($config->currentVersionGreaterThen('6.1')) { $sql .= " AND (private=0 OR users_id = '{$users_id}') "; } } if ($onlyWithVideos) { $sql .= " AND ((SELECT count(*) FROM videos v where v.categories_id = c.id OR categories_id IN (SELECT id from categories where parentId = c.id)) > 0 "; if (AVideoPlugin::isEnabledByName("Live")) { $sql .= " OR " . " (" . " SELECT count(*) FROM live_transmitions lt where " . " (lt.categories_id = c.id OR lt.categories_id IN (SELECT id from categories where parentId = c.id))" //. " AND lt.id = (select id FROM live_transmitions lt2 WHERE lt.users_id = lt2.users_id ORDER BY CREATED DESC LIMIT 1 )" . " ) > 0 "; } if (AVideoPlugin::isEnabledByName("LiveLinks")) { $sql .= " OR " . " (" . " SELECT count(*) FROM LiveLinks ll where " . " (ll.categories_id = c.id OR ll.categories_id IN (SELECT id from categories where parentId = c.id))" . " ) > 0 "; } $sql .= ")"; } - + $sortWhitelist = array('id', 'name', 'clean_name', 'description', 'iconClass', 'nextVideoOrder', 'parentId', 'type', 'users_id', 'private', 'allow_download', 'order'); - - if(!empty($_POST['sort']) && is_array($_POST['sort'])){ + + if (!empty($_POST['sort']) && is_array($_POST['sort'])) { foreach ($_POST['sort'] as $key => $value) { - if(!in_array($key, $sortWhitelist)){ + if (!in_array($key, $sortWhitelist)) { unset($_POST['sort'][$key]); } } } $sql .= BootGrid::getSqlFromPost(array('name'), "", " ORDER BY `order`, name ASC "); $cacheName = md5($sql); if (empty($_SESSION['user']['sessionCache']['getAllCategoriesClearCache'])) { $category = object_to_array(ObjectYPT::getCache($cacheName, 36000)); } else { _session_start(); unset($_SESSION['user']['sessionCache']['getAllCategoriesClearCache']); } if (empty($category)) { $res = sqlDAL::readSql($sql); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $category = array(); if ($res) { foreach ($fullResult as $row) { $totals = self::getTotalFromCategory($row['id']); $fullTotals = self::getTotalFromCategory($row['id'], false, true, true); $row['name'] = $row['name']; $row['total'] = $totals['total']; $row['fullTotal'] = $fullTotals['total']; $row['fullTotal_videos'] = $fullTotals['videos']; $row['fullTotal_lives'] = $fullTotals['lives']; $row['fullTotal_livelinks'] = $fullTotals['livelinks']; $row['owner'] = User::getNameIdentificationById(@$row['users_id']); $row['canEdit'] = self::userCanEditCategory($row['id']); $row['canAddVideo'] = self::userCanAddInCategory($row['id']); $row['hierarchy'] = self::getHierarchyString($row['parentId']); $row['hierarchyAndName'] = $row['hierarchy'] . $row['name']; $row['description_html'] = textToLink(htmlentities($row['description'])); $category[] = $row; } //$category = $res->fetch_all(MYSQLI_ASSOC); ObjectYPT::setCache($cacheName, $category); } else { $category = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } } return $category; } static function getHierarchyArray($categories_id, $hierarchyArray = array()) { if (empty($categories_id)) { return $hierarchyArray; } $sql = "SELECT * FROM categories WHERE id=? "; $res = sqlDAL::readSql($sql, "i", array($categories_id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($result) { $hierarchyArray[] = $result; return self::getHierarchyArray($result['parentId'], $hierarchyArray); } return $hierarchyArray; } static function getHierarchyString($categories_id) { if (empty($categories_id)) { return "/"; } $array = array_reverse(self::getHierarchyArray($categories_id)); //$array = (self::getHierarchyArray($categories_id)); //var_dump($array);exit; if (empty($array)) { return "/"; } $str = "/"; foreach ($array as $value) { $str .= xss_esc_back($value['name']) . "/"; } return $str; } static function userCanAddInCategory($categories_id, $users_id = 0) { if (empty($categories_id)) { return false; } if (empty($users_id)) { $users_id = User::getId(); } if (empty($users_id)) { return false; } $cat = new Category($categories_id); if (empty($cat->getPrivate()) || $users_id == $cat->getUsers_id()) { return true; } return false; } static function userCanEditCategory($categories_id, $users_id = 0) { if (empty($categories_id)) { return false; } if (empty($users_id)) { $users_id = User::getId(); } if (empty($users_id)) { return false; } if (User::isAdmin()) { return true; } $cat = new Category($categories_id); if ($users_id == $cat->getUsers_id()) { return true; } return false; } static function canCreateCategory() { global $advancedCustomUser; if (User::isAdmin()) { return true; } if ($advancedCustomUser && $advancedCustomUser->usersCanCreateNewCategories && User::canUpload()) { return true; } return false; } static function getChildCategories($parentId, $filterCanAddVideoOnly = false) { global $global, $config; if ($config->currentVersionLowerThen('8.4')) { return false; } $sql = "SELECT * FROM categories WHERE parentId=? AND id!=? "; if ($filterCanAddVideoOnly && !User::isAdmin()) { if (is_int($filterCanAddVideoOnly)) { $users_id = $filterCanAddVideoOnly; } else { $users_id = User::getId(); } if ($config->currentVersionGreaterThen('6.1')) { $sql .= " AND (private=0 OR users_id = '{$users_id}') "; } } $sql .= BootGrid::getSqlFromPost(array('name'), "", " ORDER BY `order`, name ASC "); $res = sqlDAL::readSql($sql, "ii", array($parentId, $parentId)); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $category = array(); if ($res) { foreach ($fullResult as $row) { $totals = self::getTotalFromCategory($row['id']); $row['name'] = xss_esc_back($row['name']); $row['total'] = $totals['total']; $row['total_array'] = $totals; $category[] = $row; } } else { $category = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $category; } static function getChildCategoriesFromTitle($clean_title) { $row = self::getCategoryByName($clean_title); return self::getChildCategories($row['id']); } static function getTotalFromCategory($categories_id, $showUnlisted = false, $getAllVideos = false, $renew = false) { $videos = self::getTotalVideosFromCategory($categories_id, $showUnlisted, $getAllVideos, $renew); $lives = self::getTotalLivesFromCategory($categories_id, $showUnlisted, $renew); $livelinkss = self::getTotalLiveLinksFromCategory($categories_id, $showUnlisted, $renew); $total = $videos + $lives + $livelinkss; return array('videos' => $videos, 'lives' => $lives, 'livelinks' => $livelinkss, 'total' => $total); } static function getTotalFromChildCategory($categories_id, $showUnlisted = false, $getAllVideos = false, $renew = false) { $categories = self::getChildCategories($categories_id); $array = array('videos' => 0, 'lives' => 0, 'livelinks' => 0, 'total' => 0); foreach ($categories as $value) { $totals = self::getTotalFromCategory($categories_id, $showUnlisted, $getAllVideos, $renew); $array = array( 'videos' => $array['videos'] + $totals['videos'], 'lives' => $array['lives'] + $totals['lives'], 'livelinks' => $array['livelinks'] + $totals['livelinks'], 'total' => $array['total'] + $totals['total']); $totals = self::getTotalFromChildCategory($value['id'], $showUnlisted, $getAllVideos, $renew); $array = array( 'videos' => $array['videos'] + $totals['videos'], 'lives' => $array['lives'] + $totals['lives'], 'livelinks' => $array['livelinks'] + $totals['livelinks'], 'total' => $array['total'] + $totals['total']); } return $array; } static function getTotalVideosFromCategory($categories_id, $showUnlisted = false, $getAllVideos = false, $renew = false) { global $global, $config; if ($renew || empty($_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][intval($getAllVideos)]['videos'])) { $sql = "SELECT count(id) as total FROM videos v WHERE 1=1 AND categories_id = ? "; if (User::isLogged()) { $sql .= " AND (v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "') OR (v.status='u' AND v.users_id ='" . User::getId() . "'))"; } else { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } if (!$getAllVideos) { $sql .= Video::getUserGroupsCanSeeSQL(); } //echo $categories_id, $sql;exit; $res = sqlDAL::readSql($sql, "i", array($categories_id)); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $total = empty($fullResult[0]['total']) ? 0 : intval($fullResult[0]['total']); $rows = self::getChildCategories($categories_id); foreach ($rows as $value) { $total += self::getTotalVideosFromCategory($value['id'], $showUnlisted, $getAllVideos, $renew); } _session_start(); $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][intval($getAllVideos)]['videos'] = $total; } return $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][intval($getAllVideos)]['videos']; } static function getLatestVideoFromCategory($categories_id, $showUnlisted = false, $getAllVideos = false) { global $global, $config; $sql = "SELECT * FROM videos v WHERE 1=1 AND (categories_id = ? OR categories_id IN (SELECT id from categories where parentId = ?))"; if (User::isLogged()) { $sql .= " AND (v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "') OR (v.status='u' AND v.users_id ='" . User::getId() . "'))"; } else { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } if (!$getAllVideos) { $sql .= Video::getUserGroupsCanSeeSQL(); } $sql .= "ORDER BY created DESC LIMIT 1"; //var_dump($sql, $categories_id); $res = sqlDAL::readSql($sql, "ii", array($categories_id, $categories_id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $result; } - - + static function getLatestLiveFromCategory($categories_id) { if (!AVideoPlugin::isEnabledByName("Live")) { return array(); } global $global, $config; $sql = "SELECT * FROM live_transmitions lt LEFT JOIN live_transmitions_history lth ON lt.users_id = lth.users_id " . " WHERE 1=1 AND (categories_id = ? OR categories_id IN (SELECT id from categories where parentId = ?))"; $sql .= "ORDER BY lth.created DESC LIMIT 1"; //var_dump($sql, $categories_id); $res = sqlDAL::readSql($sql, "ii", array($categories_id, $categories_id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $result; } static function getLatestLiveLinksFromCategory($categories_id) { if (AVideoPlugin::isEnabledByName("LiveLinks")) { return array(); } global $global, $config; $sql = "SELECT * FROM livelinks WHERE 1=1 AND (categories_id = ? OR categories_id IN (SELECT id from categories where parentId = ?))"; $sql .= "ORDER BY created DESC LIMIT 1"; //var_dump($sql, $categories_id); $res = sqlDAL::readSql($sql, "ii", array($categories_id, $categories_id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $result; } static function getTotalLiveLinksFromCategory($categories_id, $showUnlisted = false, $renew = false) { global $global; if (!AVideoPlugin::isEnabledByName("LiveLinks")) { return 0; } if ($renew || empty($_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['livelinks'])) { $sql = "SELECT count(id) as total FROM LiveLinks v WHERE 1=1 AND categories_id = ? "; if (empty($showUnlisted)) { $sql .= " AND `type` = 'public' "; } //echo $categories_id, $sql;exit; $res = sqlDAL::readSql($sql, "i", array($categories_id)); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $total = empty($fullResult[0]['total']) ? 0 : intval($fullResult[0]['total']); $rows = self::getChildCategories($categories_id); foreach ($rows as $value) { $total += self::getTotalLivesFromCategory($value['id'], $showUnlisted, $renew); } _session_start(); $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['livelinks'] = $total; } return $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['livelinks']; } static function getTotalLivesFromCategory($categories_id, $showUnlisted = false, $renew = false) { if (!AVideoPlugin::isEnabledByName("Live")) { return 0; } global $global; if ($renew || empty($_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['live'])) { $sql = "SELECT count(id) as total FROM live_transmitions v WHERE 1=1 AND categories_id = ? "; if (empty($showUnlisted)) { $sql .= " AND public = 1 "; } //echo $categories_id, $sql;exit; $res = sqlDAL::readSql($sql, "i", array($categories_id)); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $total = empty($fullResult[0]['total']) ? 0 : intval($fullResult[0]['total']); $rows = self::getChildCategories($categories_id); foreach ($rows as $value) { $total += self::getTotalLivesFromCategory($value['id'], $showUnlisted, $renew); } _session_start(); $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['live'] = $total; } return $_SESSION['user']['sessionCache']['categoryTotal'][$categories_id][intval($showUnlisted)][0]['live']; } static function clearCacheCount($categories_id = 0) { // clear category count cache _session_start(); if (empty($categories_id)) { unset($_SESSION['user']['sessionCache']['categoryTotal']); $_SESSION['user']['sessionCache']['getAllCategoriesClearCache'] = 1; } else { unset($_SESSION['user']['sessionCache']['categoryTotal'][$categories_id]); } //session_write_close(); } static function getTotalCategories($filterCanAddVideoOnly = false, $onlyWithVideos = false) { global $global, $config; if ($config->currentVersionLowerThen('5.01')) { return false; } $sql = "SELECT id, parentId FROM categories c WHERE 1=1 "; if ($filterCanAddVideoOnly && !User::isAdmin()) { if (is_int($filterCanAddVideoOnly)) { $users_id = $filterCanAddVideoOnly; } else { $users_id = User::getId(); } if ($config->currentVersionGreaterThen('6.1')) { $sql .= " AND (private=0 OR users_id = '{$users_id}') "; } } if (!empty($_GET['parentsOnly'])) { $sql .= "AND parentId = 0 OR parentId = -1 "; } if ($onlyWithVideos) { $sql .= " AND ((SELECT count(*) FROM videos v where v.categories_id = c.id OR categories_id IN (SELECT id from categories where parentId = c.id)) > 0 "; if (AVideoPlugin::isEnabledByName("Live")) { $sql .= " OR " . " (" . " SELECT count(*) FROM live_transmitions lt where " . " (lt.categories_id = c.id OR lt.categories_id IN (SELECT id from categories where parentId = c.id))" //. " AND lt.id = (select id FROM live_transmitions lt2 WHERE lt.users_id = lt2.users_id ORDER BY CREATED DESC LIMIT 1 )" . " ) > 0 "; } if (AVideoPlugin::isEnabledByName("LiveLinks")) { $sql .= " OR " . " (" . " SELECT count(*) FROM LiveLinks ll where " . " (ll.categories_id = c.id OR ll.categories_id IN (SELECT id from categories where parentId = c.id))" . " ) > 0 "; } $sql .= ")"; } $sql .= BootGrid::getSqlSearchFromPost(array('name')); //echo $sql;exit; $res = sqlDAL::readSql($sql); $numRows = sqlDal::num_rows($res); sqlDAL::close($res); return $numRows; } function getIconClass() { if (empty($this->iconClass)) { return "fa fa-folder"; } return $this->iconClass; } function setIconClass($iconClass) { $this->iconClass = $iconClass; } function getName() { return $this->name; } function getClean_name() { return $this->clean_name; } function getDescription() { return $this->description; } function getAllow_download() { return $this->allow_download; } function setAllow_download($allow_download) { $this->allow_download = intval($allow_download); } static function getCategoryDirPath($categories_id = "") { global $global; $dir = "videos/categories/assets/"; if (!empty($categories_id)) { $dir .= $categories_id . "/"; } $path = array(); $path['dir'] = "{$global['systemRootPath']}{$dir}"; make_path($path['dir']); $path['path'] = "{$global['systemRootPath']}{$dir}"; $path['url'] = "{$global['webSiteRootURL']}{$dir}"; return $path; } static function isAssetsValids($categories_id) { $photo = Category::getCategoryPhotoPath($categories_id); $background = Category::getCategoryBackgroundPath($categories_id); //var_dump(filesize($background['path']), $background['path'], filesize($photo['path']), $photo['path'] ); if (!file_exists($photo['path']) || !file_exists($background['path'])) { return false; } - if(filesize($photo['path']) <= 190){ // transparent image + if (filesize($photo['path']) <= 190) { // transparent image return false; } - if(filesize($background['path']) <= 980 || filesize($background['path']) == 4480){ // transparent image + if (filesize($background['path']) <= 980 || filesize($background['path']) == 4480) { // transparent image return false; } return true; } static function getCategoryPhotoPath($categories_id) { $path = self::getCategoryAssetPath("photo.png", $categories_id); return $path; } static function getCategoryBackgroundPath($categories_id) { $path = self::getCategoryAssetPath("background.png", $categories_id); return $path; } private static function getCategoryAssetPath($name, $categories_id) { if (empty($categories_id)) { return false; } if (empty($name)) { return false; } $dirPaths = self::getCategoryDirPath($categories_id); global $global; $path = array(); $path['dir'] = $dirPaths['url']; $path['path'] = "{$dirPaths['path']}{$name}"; $path['url'] = "{$dirPaths['url']}{$name}"; if (file_exists($path['path'])) { $path['url+timestamp'] = "{$path['url']}?" . filectime($path['path']); } else { $path['url+timestamp'] = $path['url']; } return $path; } } diff --git a/objects/categoryAddNew.json.php b/objects/categoryAddNew.json.php index 8e11540a4..c84c0a117 100644 --- a/objects/categoryAddNew.json.php +++ b/objects/categoryAddNew.json.php @@ -1,48 +1,49 @@ error = true; $obj->msg = true; $obj->categories_id = 0; $obj->image1 = 0; $obj->image2 = 0; if(!Category::canCreateCategory()){ $obj->msg = __("Permission denied"); die(json_encode($obj)); } $objCat = new Category(intval(@$_POST['id'])); $objCat->setName($_POST['name']); $objCat->setClean_name($_POST['clean_name']); $objCat->setDescription($_POST['description']); $objCat->setIconClass($_POST['iconClass']); -$objCat->setNextVideoOrder($_POST['nextVideoOrder']); +//$objCat->setNextVideoOrder($_POST['nextVideoOrder']); +$objCat->setSuggested($_POST['suggested']); $objCat->setParentId($_POST['parentId']); $objCat->setPrivate($_POST['private']); $objCat->setAllow_download($_POST['allow_download']); $objCat->setOrder($_POST['order']); $obj->categories_id = $objCat->save(); //$objCat->setType($_POST['type'],$id); if(!empty($obj->categories_id)){ $obj->error = false; $path = Category::getCategoryPhotoPath($obj->categories_id); $obj->image1 = saveCroppieImage($path['path'], "image1"); $obj->image1P = $path['path']; $path = Category::getCategoryBackgroundPath($obj->categories_id); $obj->image2 = saveCroppieImage($path['path'], "image2"); $obj->image2P = $path['path']; } die(json_encode($obj)); diff --git a/objects/user.php b/objects/user.php index ef2f3dfd7..00264cdd4 100644 --- a/objects/user.php +++ b/objects/user.php @@ -1,2392 +1,2397 @@ user = $user; if ($password !== false) { $this->password = $password; } else { $this->loadFromUser($user); } } else { // get data from id $this->load($id); } } public function getEmail() { return $this->email; } public function getUser() { return $this->user; } public function getAbout() { return str_replace(array('\\\\\\\n'), array("\n"), $this->about); } public function setAbout($about) { $this->about = xss_esc($about); } public function getPassword() { return $this->password; } public function getCanStream() { return $this->canStream; } public function setCanStream($canStream) { $this->canStream = (empty($canStream) || strtolower($canStream) === 'false') ? 0 : 1; } public function getCanViewChart() { return $this->canViewChart; } public function setCanViewChart($canViewChart) { $this->canViewChart = (empty($canViewChart) || strtolower($canViewChart) === 'false') ? 0 : 1; } public function getCanCreateMeet() { return $this->canCreateMeet; } public function setCanCreateMeet($canCreateMeet) { $this->canCreateMeet = (empty($canCreateMeet) || strtolower($canCreateMeet) === 'false') ? 0 : 1; ; } public function getCanUpload() { return $this->canUpload; } public function setCanUpload($canUpload) { $this->canUpload = (empty($canUpload) || strtolower($canUpload) === 'false') ? 0 : 1; } public function getAnalyticsCode() { return $this->analyticsCode; } public function setAnalyticsCode($analyticsCode) { preg_match("/(ua-\d{4,9}-\d{1,4})/i", $analyticsCode, $matches); if (!empty($matches[1])) { $this->analyticsCode = $matches[1]; } else { $this->analyticsCode = ""; } } public function getAnalytics() { $id = $this->getId(); $aCode = $this->getAnalyticsCode(); if (!empty($id) && !empty($aCode)) { $code = " "; } else { $code = ""; } return $code; } public function addExternalOptions($id, $value) { $eo = unserialize(base64_decode($this->externalOptions)); if (!is_array($eo)) { $eo = array(); } $eo[$id] = $value; $this->setExternalOptions($eo); return $this->save(); } public function removeExternalOptions($id) { $eo = unserialize(base64_decode($this->externalOptions)); unset($eo[$id]); $this->setExternalOptions($eo); return $this->save(); } public function setExternalOptions($options) { //we convert it to base64 to sanitize the input since we do not validate input from externalOptions $this->externalOptions = base64_encode(serialize($options)); } public function getExternalOption($id) { $eo = unserialize(base64_decode($this->externalOptions)); if (empty($eo[$id])) { return null; } return $eo[$id]; } private function load($id) { $id = intval($id); if (empty($id)) { return false; } $user = self::getUserDb($id); if (empty($user)) { return false; } foreach ($user as $key => $value) { $this->$key = $value; } return true; } private function loadFromUser($user) { $userLoaded = self::getUserDbFromUser($user); if (empty($userLoaded)) { return false; } _error_log("User::loadFromUser($user) "); _error_log("User::loadFromUser json " . json_encode(debug_backtrace())); foreach ($userLoaded as $key => $value) { $this->$key = $value; } return true; } public function loadSelfUser() { $this->load($this->getId()); } public static function getId() { if (self::isLogged()) { return $_SESSION['user']['id']; } else { return false; } } public static function getEmail_() { if (self::isLogged()) { return $_SESSION['user']['email']; } else { return false; } } public function getBdId() { return $this->id; } public static function updateSessionInfo() { if (self::isLogged()) { $user = self::getUserDb($_SESSION['user']['id']); $_SESSION['user'] = $user; } } public static function getName() { if (self::isLogged()) { return $_SESSION['user']['name']; } else { return false; } } public static function getUserName() { if (self::isLogged()) { return $_SESSION['user']['user']; } else { return false; } } public static function getUserChannelName() { if (self::isLogged()) { if (empty($_SESSION['user']['channelName'])) { $_SESSION['user']['channelName'] = self::_recommendChannelName(); $user = new User(User::getId()); $user->setChannelName($_SESSION['user']['channelName']); $user->save(); } return $_SESSION['user']['channelName']; } else { return false; } } public static function _recommendChannelName($name = "", $try = 0, $unknown = "", $users_id = 0) { if (empty($users_id)) { if (!empty(User::getId())) { $users_id = User::getId(); } } if (empty($users_id)) { $newChannelName = $name . "_" . uniqid(); if (strlen($newChannelName) > 40) { $newChannelName = uniqid(); } return $newChannelName; } if ($try > 10) { _error_log("User:_recommendChannelName too many tries ({$name}) (" . User::getId() . ") ", AVideoLog::$ERROR); return uniqid(); } if (empty($name)) { $name = self::getNameIdentification(); if ($name == __("Unknown User") && !empty($unknown)) { $name = $unknown; } $name = cleanString($name); } // in case is a email get only the username $parts = explode("@", $name); $name = $parts[0]; // do not exceed 36 chars to leave some room for the unique id; $name = substr($name, 0, 36); if (!Permissions::canAdminUsers()) { $user = self::getUserFromChannelName($name); if ($user && $user['id'] !== $users_id) { return self::_recommendChannelName($name . "_" . uniqid(), $try + 1); } } return $name; } public static function getUserFromChannelName($channelName) { $channelName = cleanString($channelName); global $global; $channelName = ($channelName); $sql = "SELECT * FROM users WHERE channelName = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($channelName)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { $user = cleanUpRowFromDatabase($user); return $user; } else { return false; } } /** * return an name to identify the user * @return String */ public static function getNameIdentification() { global $advancedCustomUser; if (self::isLogged()) { if (!empty(self::getName()) && empty($advancedCustomUser->doNotIndentifyByName)) { return self::getName(); } if (!empty(self::getMail()) && empty($advancedCustomUser->doNotIndentifyByEmail)) { return self::getMail(); } if (!empty(self::getUserName()) && empty($advancedCustomUser->doNotIndentifyByUserName)) { return self::getUserName(); } if (!empty(self::getUserChannelName())) { return self::getUserChannelName(); } } return __("Unknown User"); } /** * return an name to identify the user from database * @return String */ public function getNameIdentificationBd() { global $advancedCustomUser; if (!empty($this->name) && empty($advancedCustomUser->doNotIndentifyByName)) { return $this->name; } if (!empty($this->email) && empty($advancedCustomUser->doNotIndentifyByEmail)) { return $this->email; } if (!empty($this->user) && empty($advancedCustomUser->doNotIndentifyByUserName)) { return $this->user; } if (!empty($this->channelName)) { return $this->channelName; } return __("Unknown User"); } public static function getNameIdentificationById($id = "") { if (!empty($id)) { $user = new User($id); return $user->getNameIdentificationBd(); } return __("Unknown User"); } public static function getUserPass() { if (self::isLogged()) { return $_SESSION['user']['password']; } else { return false; } } public function _getName() { return $this->name; } public function getBdName() { return $this->_getName(); } public static function _getPhoto($id = "") { global $global; if (!empty($id)) { $user = self::findById($id); if (!empty($user)) { $photo = $user['photoURL']; } } elseif (self::isLogged()) { $photo = $_SESSION['user']['photoURL']; } if (!empty($photo)) { if (preg_match("/videos\/userPhoto\/.*/", $photo) && file_exists($global['systemRootPath'] . $photo)) { return $photo; } else { $photoPath = "/videos/userPhoto/photo{$id}.png"; $content = url_get_contents($photo); file_put_contents($global['systemRootPath'] . $photoPath, $content); $photo = $photoPath; } } if (empty($photo)) { $photo = "view/img/userSilhouette.jpg"; } return $photo; } public static function getPhoto($id = "") { global $global; if (!empty($id)) { $user = self::findById($id); if (!empty($user)) { $photo = $user['photoURL']; } } elseif (self::isLogged()) { $photo = $_SESSION['user']['photoURL']; } if (!empty($photo) && preg_match("/videos\/userPhoto\/.*/", $photo)) { if (file_exists($global['systemRootPath'] . $photo)) { $photo = getCDN() . $photo . "?" . filemtime($global['systemRootPath'] . $photo); } else { $photo = ""; } } if (empty($photo)) { $photo = getCDN() . "view/img/userSilhouette.jpg"; } return $photo; } public static function _getOGImage($users_id) { return "/videos/userPhoto/photo{$users_id}_og_200X200.jpg"; } public static function deleteOGImage($users_id) { global $global; $photo = $global['systemRootPath'] . self::_getOGImage($users_id); @unlink($photo); } public static function getOGImage($users_id = "") { global $global; $photo = self::_getPhoto($users_id); if ($photo == "view/img/userSilhouette.jpg") { return getCDN() . "view/img/userSilhouette.jpg"; } if (empty($photo)) { return false; } $source = $global['systemRootPath'] . $photo; $destination = $global['systemRootPath'] . self::_getOGImage($users_id); convertImageToOG($source, $destination); return getCDN() . self::_getOGImage($users_id); } public static function getEmailVerifiedIcon($id = "") { global $advancedCustomUser; $mark = ""; if (!empty($advancedCustomUser->showEmailVerifiedMark)) { if (!empty($id)) { $user = self::findById($id); if (!empty($user)) { $verified = $user['emailVerified']; } } elseif (self::isLogged()) { $verified = $_SESSION['user']['emailVerified']; } if (!empty($verified)) { $mark .= ' '; } else { //return ''; $mark .= ''; } } if ($advancedCustomUser->Checkmark1Enabled) { if (User::externalOptionsFromUserID($id, "checkmark1")) { $mark .= " " . $advancedCustomUser->Checkmark1HTML; } } if ($advancedCustomUser->Checkmark2Enabled) { if (User::externalOptionsFromUserID($id, "checkmark2")) { $mark .= " " . $advancedCustomUser->Checkmark2HTML; } } if ($advancedCustomUser->Checkmark3Enabled) { if (User::externalOptionsFromUserID($id, "checkmark3")) { $mark .= " " . $advancedCustomUser->Checkmark3HTML; } } return $mark; } public function getPhotoDB() { global $global; $photo = self::getPhoto($this->id); return $photo; } public static function getBackground($id = "") { global $global; if (!empty($id)) { $user = self::findById($id); if (!empty($user)) { $photo = $user['backgroundURL']; } } elseif (self::isLogged()) { $photo = $_SESSION['user']['backgroundURL']; } if (!empty($photo) && preg_match("/videos\/userPhoto\/.*/", $photo)) { if (file_exists($global['systemRootPath'] . $photo)) { $photo = getCDN() . $photo; } else { $photo = ""; } } if (empty($photo)) { $photo = getCDN() . "view/img/background.png"; } return $photo; } public static function getMail() { if (self::isLogged()) { return $_SESSION['user']['email']; } else { return false; } } public function save($updateUserGroups = false) { global $global, $config, $advancedCustom, $advancedCustomUser; if (is_object($config) && $config->currentVersionLowerThen('5.6')) { // they dont have analytics code return false; } if (empty($this->user) || empty($this->password)) { //echo "u:" . $this->user . "|p:" . strlen($this->password); _error_log('Error : ' . __("You need a user and passsword to register")); return false; } if (empty($this->isAdmin)) { $this->isAdmin = "false"; } if (empty($this->canStream)) { if (empty($this->id)) { // it is a new user if (empty($advancedCustomUser->newUsersCanStream)) { $this->canStream = "0"; } else { $this->canStream = "1"; } } else { $this->canStream = "0"; } } if (empty($this->canUpload)) { $this->canUpload = "0"; } if (empty($this->status)) { $this->status = 'a'; } if (empty($this->emailVerified)) { $this->emailVerified = "false"; } $user = ($this->user); $password = ($this->password); $name = ($this->name); $status = ($this->status); $this->about = preg_replace("/(\\\)+n/", "\n", $this->about); $this->channelName = self::_recommendChannelName($this->channelName, 0, $this->user, $this->id); $channelName = ($this->channelName); if (filter_var($this->donationLink, FILTER_VALIDATE_URL) === false) { $this->donationLink = ""; } if (!empty($this->id)) { $formats = "ssssiiii"; $values = array($user, $password, $this->email, $name, $this->isAdmin, $this->canStream, $this->canUpload, $this->canCreateMeet); $sql = "UPDATE users SET user = ?, password = ?, " . "email = ?, name = ?, isAdmin = ?," . "canStream = ?,canUpload = ?,canCreateMeet = ?,"; if (isset($this->canViewChart)) { $formats .= "i"; $values[] = $this->canViewChart; $sql .= "canViewChart = ?, "; } $formats .= "ssssssissssssssssi"; $values[] = $this->status; $values[] = $this->photoURL; $values[] = $this->backgroundURL; $values[] = $this->recoverPass; $values[] = $this->about; $values[] = $this->channelName; $values[] = $this->emailVerified; $values[] = $this->analyticsCode; $values[] = $this->externalOptions; $values[] = $this->first_name; $values[] = $this->last_name; $values[] = $this->address; $values[] = $this->zip_code; $values[] = $this->country; $values[] = $this->region; $values[] = $this->city; $values[] = $this->donationLink; $values[] = $this->id; $sql .= "status = ?, " . "photoURL = ?, backgroundURL = ?, " . "recoverPass = ?, about = ?, " . " channelName = ?, emailVerified = ? , analyticsCode = ?, externalOptions = ? , " . " first_name = ? , last_name = ? , address = ? , zip_code = ? , country = ? , region = ? , city = ? , donationLink = ? , " . " modified = now() WHERE id = ?"; } else { $formats = "ssssiiiissssss"; $values = array($user, $password, $this->email, $name, $this->isAdmin, $this->canStream, $this->canUpload, $this->canCreateMeet, $status, $this->photoURL, $this->recoverPass, $channelName, $this->analyticsCode, $this->externalOptions); $sql = "INSERT INTO users (user, password, email, name, isAdmin, canStream, canUpload, canCreateMeet, canViewChart, status,photoURL,recoverPass, created, modified, channelName, analyticsCode, externalOptions) " . " VALUES (?,?,?,?,?,?,?,?, false, " . "?,?,?, now(), now(),?,?,?)"; } $insert_row = sqlDAL::writeSql($sql, $formats, $values); if ($insert_row) { if (empty($this->id)) { $id = $global['mysqli']->insert_id; if (!empty($advancedCustomUser->unverifiedEmailsCanNOTLogin)) { self::sendVerificationLink($id); } } else { $id = $this->id; } if ($updateUserGroups) { require_once $global['systemRootPath'] . 'objects/userGroups.php'; // update the user groups UserGroups::updateUserGroups($id, $this->userGroups); } return $id; } else { _error_log(' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error . " $sql"); return false; } } public static function getChannelOwner($channelName) { global $global; $channelName = ($channelName); $sql = "SELECT * FROM users WHERE channelName = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($channelName)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $result = cleanUpRowFromDatabase($result); $user = $result; } else { $user = false; } return $user; } public static function getFromUsername($user) { global $global; $user = ($user); $sql = "SELECT * FROM users WHERE user = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($user)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $result = cleanUpRowFromDatabase($result); $user = $result; } else { $user = false; } return $user; } private static function setCacheWatchVideo($cacheName, $value) { if (!User::isLogged()) { ObjectYPT::setCache($cacheName, $value); ; } else { ObjectYPT::setSessionCache($cacheName, $value); } } public static function canWatchVideo($videos_id) { $cacheName = "canWatchVideo$videos_id"; if (!User::isLogged()) { $cacheName = "canWatchVideoNOTLOGED$videos_id"; $cache = ObjectYPT::getCache($cacheName, 3600); } else { $cache = ObjectYPT::getSessionCache($cacheName, 600); } if (isset($cache)) { if($cache === 'false'){ $cache = false; } return $cache; } if (empty($videos_id)) { _error_log("User::canWatchVideo Video is empty ({$videos_id})"); return false; } if (User::isAdmin()) { return true; } $video = new Video("", "", $videos_id); if ($video->getStatus() === 'i') { _error_log("User::canWatchVideo Video is inactive ({$videos_id})"); self::setCacheWatchVideo($cacheName, false); return false; } $user = new User($video->getUsers_id()); if ($user->getStatus() === 'i') { _error_log("User::canWatchVideo User is inactive ({$videos_id})"); self::setCacheWatchVideo($cacheName, false); return false; } if (AVideoPlugin::userCanWatchVideo(User::getId(), $videos_id)) { self::setCacheWatchVideo($cacheName, true); return true; } // check if the video is not public $rows = UserGroups::getVideoGroups($videos_id); if (empty($rows)) { // check if any plugin restrict access to this video if (!AVideoPlugin::userCanWatchVideo(User::getId(), $videos_id)) { if (User::isLogged()) { _error_log("User::canWatchVideo there is no usergorup set for this video but A plugin said user [" . User::getId() . "] can not see ({$videos_id})"); } else { _error_log("User::canWatchVideo there is no usergorup set for this video but A plugin said user [not logged] can not see ({$videos_id})"); } self::setCacheWatchVideo($cacheName, false); return false; } else { self::setCacheWatchVideo($cacheName, true); return true; // the video is public } } if (!User::isLogged()) { _error_log("User::canWatchVideo You are not logged so can not see ({$videos_id}) session_id=" . session_id() . " SCRIPT_NAME=" . $_SERVER["SCRIPT_NAME"] . " IP = " . getRealIpAddr()); self::setCacheWatchVideo($cacheName, false); return false; } // if is not public check if the user is on one of its groups $rowsUser = UserGroups::getUserGroups(User::getId()); foreach ($rows as $value) { foreach ($rowsUser as $value2) { if ($value['id'] === $value2['id']) { self::setCacheWatchVideo($cacheName, true); return true; } } } _error_log("User::canWatchVideo The user " . User::getId() . " is not on any of the user groups ({$videos_id}) " . json_encode($rows)); self::setCacheWatchVideo($cacheName, false); return false; } public static function canWatchVideoWithAds($videos_id) { if (empty($videos_id)) { _error_log("User::canWatchVideo (videos_id is empty) " . $videos_id); return false; } if (User::isAdmin()) { return true; } if (AVideoPlugin::userCanWatchVideoWithAds(User::getId(), $videos_id)) { //_error_log("User::userCanWatchVideoWithAds (can) " . User::getId() . " " . $videos_id); return true; } _error_log("User::userCanWatchVideoWithAds (No can not) " . User::getId() . " " . $videos_id); if (self::canWatchVideo($videos_id)) { //_error_log("User::canWatchVideo (can) " . $videos_id); return true; } _error_log("User::canWatchVideo (No can not) " . $videos_id); return false; } public function delete() { if (!self::isAdmin()) { return false; } // cannot delete yourself if (self::getId() === $this->id) { return false; } global $global; if (!empty($this->id)) { $sql = "DELETE FROM users WHERE id = ?"; } else { return false; } return sqlDAL::writeSql($sql, "i", array($this->id)); } const USER_LOGGED = 0; const USER_NOT_VERIFIED = 1; const USER_NOT_FOUND = 2; const CAPTCHA_ERROR = 3; const REQUIRE2FA = 4; public function login($noPass = false, $encodedPass = false, $ignoreEmailVerification = false) { if (User::isLogged()) { return false; } global $global, $advancedCustom, $advancedCustomUser, $config; if (strtolower($encodedPass) === 'false') { $encodedPass = false; } //_error_log("user::login: noPass = $noPass, encodedPass = $encodedPass, this->user, $this->user " . getRealIpAddr()); if ($noPass) { $user = $this->find($this->user, false, true); } else { $user = $this->find($this->user, $this->password, true, $encodedPass); } if (!self::checkLoginAttempts()) { return self::CAPTCHA_ERROR; } ObjectYPT::clearSessionCache(); _session_start(); // check for multiple logins attempts to prevent hacking end // if user is not verified if (empty($ignoreEmailVerification) && !empty($user) && empty($user['isAdmin']) && empty($user['emailVerified']) && !empty($advancedCustomUser->unverifiedEmailsCanNOTLogin)) { unset($_SESSION['user']); self::sendVerificationLink($user['id']); return self::USER_NOT_VERIFIED; } elseif ($user) { $_SESSION['user'] = $user; $this->setLastLogin($_SESSION['user']['id']); $rememberme = 0; if ((!empty($_POST['rememberme']) && $_POST['rememberme'] == "true") || !empty($_COOKIE['rememberme'])) { $expires = strtotime("+ 1 year"); $rememberme = 1; } else { $expires = 0; } _setcookie("rememberme", $rememberme, $expires); _setcookie("user", $user['user'], $expires); _setcookie("pass", $user['password'], $expires); AVideoPlugin::onUserSignIn($_SESSION['user']['id']); $_SESSION['loginAttempts'] = 0; session_write_close(); return self::USER_LOGGED; } else { unset($_SESSION['user']); return self::USER_NOT_FOUND; } } public static function isCaptchaNeed() { global $advancedCustomUser; // check for multiple logins attempts to prevent hacking if (!empty($_SESSION['loginAttempts']) && !empty($advancedCustomUser->requestCaptchaAfterLoginsAttempts)) { if (isMobile()) { $advancedCustomUser->requestCaptchaAfterLoginsAttempts += 10; } if ($_SESSION['loginAttempts'] > $advancedCustomUser->requestCaptchaAfterLoginsAttempts) { return true; } } return false; } public static function checkLoginAttempts() { global $advancedCustomUser, $global; // check for multiple logins attempts to prevent hacking if (empty($_SESSION['loginAttempts'])) { _session_start(); $_SESSION['loginAttempts'] = 0; } if (!empty($advancedCustomUser->requestCaptchaAfterLoginsAttempts)) { _session_start(); $_SESSION['loginAttempts']++; if ($_SESSION['loginAttempts'] > $advancedCustomUser->requestCaptchaAfterLoginsAttempts) { if (empty($_POST['captcha'])) { return false; } require_once $global['systemRootPath'] . 'objects/captcha.php'; if (!Captcha::validation($_POST['captcha'])) { return false; } } } return true; } public static function getCaptchaFormIfNeed() { // check for multiple logins attempts to prevent hacking if (self::isCaptchaNeed()) { return self::getCaptchaForm(); } return ""; } public static function getCaptchaForm($uid = "") { global $global; return '
' . '
'; } private function setLastLogin($user_id) { global $global; if (empty($user_id)) { die('Error : setLastLogin '); } $sql = "UPDATE users SET lastLogin = now(), modified = now() WHERE id = ?"; return sqlDAL::writeSql($sql, "i", array($user_id)); } public static function logoff() { global $global, $justLogoff; $justLogoff = true; _session_start(); ObjectYPT::deleteAllSessionCache(); _unsetcookie('rememberme'); _unsetcookie('user'); _unsetcookie('pass'); unset($_SESSION['user']); } private static function recreateLoginFromCookie() { global $justLogoff, $justTryToRecreateLoginFromCookie; if (empty($justTryToRecreateLoginFromCookie) && empty($justLogoff) && empty($_SESSION['user']['id'])) { $justTryToRecreateLoginFromCookie = 1; // first check if the LoginControl::singleDeviceLogin is enabled, if it is only recreate login if the device is the last device if ($obj = AVideoPlugin::getDataObjectIfEnabled("LoginControl")) { if (!empty($obj->singleDeviceLogin)) { if (!LoginControl::isLoggedFromSameDevice()) { _error_log("user::recreateLoginFromCookie: LoginControl and the last logged device is different: " . $_COOKIE['user'] . ""); self::logoff(); return false; } } } if ((!empty($_COOKIE['user'])) && (!empty($_COOKIE['pass'])) && (!empty($_COOKIE['rememberme']))) { $user = new User(0, $_COOKIE['user'], false); $user->setPassword($_COOKIE['pass'], true); // $dbuser = self::getUserDbFromUser($_COOKIE['user']); $resp = $user->login(false, true); _error_log("user::recreateLoginFromCookie: do cookie-login: " . $_COOKIE['user'] . " result: " . $resp); if (0 == $resp) { _error_log("success " . $_SESSION['user']['id']); } else { _error_log("user::recreateLoginFromCookie: do logoff: " . $_COOKIE['user'] . " result: " . $resp); self::logoff(); } } } } public static function isLogged() { self::recreateLoginFromCookie(); return !empty($_SESSION['user']['id']); } public static function isVerified() { self::recreateLoginFromCookie(); return !empty($_SESSION['user']['emailVerified']); } - public static function isAdmin() { + public static function isAdmin($users_id=0) { + if(!empty($users_id)){ + $user = new User($users_id); + return !empty($user->getIsAdmin()); + } + self::recreateLoginFromCookie(); return !empty($_SESSION['user']['isAdmin']); } public static function canStream() { self::recreateLoginFromCookie(); return !empty($_SESSION['user']['isAdmin']) || !empty($_SESSION['user']['canStream']); } public static function externalOptions($id) { if (!empty($_SESSION['user']['externalOptions'])) { $externalOptions = unserialize(base64_decode($_SESSION['user']['externalOptions'])); if (isset($externalOptions[$id])) { if ($externalOptions[$id] == "true") { $externalOptions[$id] = true; } elseif ($externalOptions[$id] == "false") { $externalOptions[$id] = false; } return $externalOptions[$id]; } } return false; } public static function externalOptionsFromUserID($users_id, $id) { $user = self::findById($users_id); if ($user) { if (!is_null($user['externalOptions'])) { $externalOptions = unserialize(base64_decode($user['externalOptions'])); if (is_array($externalOptions) && sizeof($externalOptions) > 0) { foreach ($externalOptions as $k => $v) { if ($id != $k) { continue; } if ($v == "true") { $v = 1; } elseif ($v == "false") { $v = 0; } return $v; } } } } return false; } public function thisUserCanStream() { if ($this->status === 'i') { return false; } return !empty($this->isAdmin) || !empty($this->canStream); } private function find($user, $pass, $mustBeactive = false, $encodedPass = false) { global $global, $advancedCustom; $formats = ""; $values = array(); $sql = "SELECT * FROM users WHERE user = ? "; $formats .= "s"; $values[] = $user; if ($mustBeactive) { $sql .= " AND status = 'a' "; } $sql .= " LIMIT 1"; $res = sqlDAL::readSql($sql, $formats, $values, true); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if (!empty($result)) { if ($pass !== false) { if (!encryptPasswordVerify($pass, $result['password'], $encodedPass)) { if (!empty($advancedCustom) && $advancedCustom->enableOldPassHashCheck) { _error_log("Password check new hash pass does not match, trying MD5"); return $this->find_Old($user, $pass, $mustBeactive, $encodedPass); } else { return false; } } } $user = $result; } else { _error_log("Password check new hash user not found"); //check if is the old password style $user = false; //$user = false; } return $user; } /** * this is the deprecated function, with week password * @global type $global * @param type $user * @param type $pass * @param type $mustBeactive * @param type $encodedPass * @return boolean */ private function find_Old($user, $pass, $mustBeactive = false, $encodedPass = false) { global $global; $formats = ""; $values = array(); $sql = "SELECT * FROM users WHERE user = ? "; $formats .= "s"; $values[] = $user; if ($mustBeactive) { $sql .= " AND status = 'a' "; } if ($pass !== false) { if (!$encodedPass || $encodedPass === 'false') { _error_log("Password check Old not encoded pass"); $passEncoded = md5($pass); } else { _error_log("Password check Old encoded pass"); $passEncoded = $pass; } $sql .= " AND password = ? "; $formats .= "s"; $values[] = $passEncoded; } $sql .= " LIMIT 1"; $res = sqlDAL::readSql($sql, $formats, $values, true); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if (!empty($result)) { if (!$encodedPass || $encodedPass === 'false') { //update the password $u = new User($result['id']); $u->setPassword($pass); $u->save(); $result['password'] = $u->getPassword(); } $user = $result; } else { $user = false; } if (empty($user)) { _error_log("Password check Old not found"); } else { _error_log("Password check Old found"); } return $user; } private static function findById($id) { global $global; $id = intval($id); if (empty($id)) { return false; } $sql = "SELECT * FROM users WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($id)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $user = $result; } else { $user = false; } return $user; } public static function findByEmail($email) { global $global; $email = trim($email); if (empty($email)) { return false; } $sql = "SELECT * FROM users WHERE email = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($email)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res != false) { $user = $result; } else { $user = false; } return $user; } private static function getUserDb($id) { global $global; $id = intval($id); if (empty($id)) { return false; } $sql = "SELECT * FROM users WHERE id = ? LIMIT 1;"; $res = sqlDAL::readSql($sql, "i", array($id)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { return $user; } return false; } private static function getUserDbFromUser($user) { global $global; if (empty($user)) { return false; } $sql = "SELECT * FROM users WHERE user = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($user)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { return $user; } return false; } public static function getUserFromID($users_id) { global $global; if (empty($users_id)) { return false; } $sql = "SELECT * FROM users WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($users_id)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { $user['groups'] = UserGroups::getUserGroups($user['id']); $user['identification'] = self::getNameIdentificationById($user['id']); $user['photo'] = self::getPhoto($user['id']); $user['background'] = self::getBackground($user['id']); $user['tags'] = self::getTags($user['id']); $user['name'] = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/u', '', $user['name']); $user['isEmailVerified'] = $user['emailVerified']; if (!is_null($user['externalOptions'])) { $externalOptions = unserialize(base64_decode($user['externalOptions'])); if (is_array($externalOptions) && sizeof($externalOptions) > 0) { foreach ($externalOptions as $k => $v) { if ($v == "true") { $v = 1; } elseif ($v == "false") { $v = 0; } $user[$k] = $v; } } } unset($user['password'], $user['recoverPass']); if (!Permissions::canAdminUsers() && $user['id'] !== User::getId()) { unset( $user['first_name'], $user['last_name'], $user['address'], $user['zip_code'], $user['country'], $user['region'], $user['city'] ); } return $user; } return false; } public static function getUserFromEmail($email) { $email = trim($email); $sql = "SELECT * FROM users WHERE email = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($email)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { return $user; } return false; } public function setUser($user) { global $advancedCustomUser; if (empty($advancedCustomUser->userCanChangeUsername)) { if (!empty($this->user)) { return false; } } $this->user = strip_tags($user); } public function setName($name) { $this->name = strip_tags($name); } public function setEmail($email) { global $advancedCustomUser; $email = strip_tags($email); if (!empty($advancedCustomUser->emailMustBeUnique)) { if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) { return false; } $userFromEmail = User::getUserFromEmail($email); if (!empty($userFromEmail)) { return false; } } $this->email = $email; return true; } public function setPassword($password, $doNotEncrypt = false) { if (!empty($password)) { if ($doNotEncrypt) { $this->password = ($password); } else { $this->password = encryptPassword($password); } } } public function setIsAdmin($isAdmin) { if (empty($isAdmin) || $isAdmin === "false" || !User::isAdmin()) { $isAdmin = "0"; } else { $isAdmin = "1"; } $this->isAdmin = $isAdmin; } public function setStatus($status) { $this->status = strip_tags($status); } public function getPhotoURL() { return $this->photoURL; } public function setPhotoURL($photoURL) { $this->photoURL = strip_tags($photoURL); } public static function getAllUsersFromUsergroup($users_groups_id, $ignoreAdmin = false, $searchFields = array('name', 'email', 'user', 'channelName', 'about'), $status = "") { if (!Permissions::canAdminUsers() && !$ignoreAdmin) { return false; } $users_groups_id = intval($users_groups_id); if (empty($users_groups_id)) { return false; } //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT * FROM users u WHERE 1=1 "; $sql .= " AND (id IN (SELECT users_id FROM users_has_users_groups ug WHERE ug.users_groups_id = {$users_groups_id}) "; $ids = AVideoPlugin::getDynamicUsersId($users_groups_id); if(!empty($ids) && is_array($ids)){ $ids = array_unique($ids); $sql .= " OR id IN ('". implode("','", $ids)."') "; } $sql .= " ) "; if (!empty($status)) { if (strtolower($status) === 'i') { $sql .= " AND u.status = 'i' "; } else { $sql .= " AND u.status = 'a' "; } } $sql .= BootGrid::getSqlFromPost($searchFields); $user = array(); require_once $global['systemRootPath'] . 'objects/userGroups.php'; $res = sqlDAL::readSql($sql . ";"); $downloadedArray = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($downloadedArray as $row) { $row = cleanUpRowFromDatabase($row); $user[] = self::getUserInfoFromRow($row); } } else { $user = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $user; } public static function getTotalUsersFromUsergroup($users_groups_id, $ignoreAdmin = false, $status = "") { if (!Permissions::canAdminUsers() && !$ignoreAdmin) { return false; } $users_groups_id = intval($users_groups_id); if (empty($users_groups_id)) { return false; } //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT id FROM users WHERE 1=1 "; $sql .= " AND (id IN (SELECT users_id FROM users_has_users_groups ug WHERE ug.users_groups_id = {$users_groups_id}) "; $ids = AVideoPlugin::getDynamicUsersId($users_groups_id); if(!empty($ids) && is_array($ids)){ $ids = array_unique($ids); $sql .= " OR id IN ('". implode("','", $ids)."') "; } $sql .= " ) "; if (!empty($status)) { if (strtolower($status) === 'i') { $sql .= " AND status = 'i' "; } else { $sql .= " AND status = 'a' "; } } $sql .= BootGrid::getSqlSearchFromPost(array('name', 'email', 'user')); $res = sqlDAL::readSql($sql); $result = sqlDal::num_rows($res); sqlDAL::close($res); return $result; } public static function getAllUsers($ignoreAdmin = false, $searchFields = array('name', 'email', 'user', 'channelName', 'about'), $status = "") { if (!Permissions::canAdminUsers() && !$ignoreAdmin) { return false; } //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT * FROM users WHERE 1=1 "; if (!empty($status)) { if (strtolower($status) === 'i') { $sql .= " AND status = 'i' "; } else { $sql .= " AND status = 'a' "; } } $sql .= BootGrid::getSqlFromPost($searchFields); $user = array(); require_once $global['systemRootPath'] . 'objects/userGroups.php'; $res = sqlDAL::readSql($sql . ";"); $downloadedArray = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($downloadedArray as $row) { $row = cleanUpRowFromDatabase($row); $user[] = self::getUserInfoFromRow($row); } } else { $user = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $user; } public static function getAllActiveUsersThatCanUpload() { if (!Permissions::canAdminUsers()) { return false; } //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT * FROM users WHERE 1=1 AND status = 'a' AND (canUpload = 1 OR isAdmin = 1) "; $user = array(); $res = sqlDAL::readSql($sql . ";"); $downloadedArray = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($downloadedArray as $row) { $row = cleanUpRowFromDatabase($row); $user[] = $row; } } else { $user = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $user; } private static function getUserInfoFromRow($row) { $row['groups'] = UserGroups::getUserGroups($row['id']); $row['identification'] = self::getNameIdentificationById($row['id']); $row['photo'] = self::getPhoto($row['id']); $row['background'] = self::getBackground($row['id']); $row['tags'] = self::getTags($row['id']); $row['name'] = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/u', '', $row['name']); $row['isEmailVerified'] = $row['emailVerified']; if (!is_null($row['externalOptions'])) { $externalOptions = unserialize(base64_decode($row['externalOptions'])); if (is_array($externalOptions) && sizeof($externalOptions) > 0) { foreach ($externalOptions as $k => $v) { if ($v == "true") { $v = 1; } elseif ($v == "false") { $v = 0; } $row[$k] = $v; } } } unset($row['password'], $row['recoverPass']); if (!Permissions::canAdminUsers() && $row['id'] !== User::getId()) { unset( $row['first_name'], $row['last_name'], $row['address'], $row['zip_code'], $row['country'], $row['region'], $row['city'] ); } return $row; } public static function getAllUsersThatHasVideos($ignoreAdmin = false) { if (!self::isAdmin() && !$ignoreAdmin) { return false; } global $global; $sql = "SELECT * FROM users u WHERE status = 'a' AND (canUpload = 1 || isAdmin = 1) AND " . " (SELECT count(id) FROM videos where users_id = u.id )>0 "; $user = array(); $res = sqlDAL::readSql($sql . ";"); $downloadedArray = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($downloadedArray as $row) { $row = cleanUpRowFromDatabase($row); $user[] = $row; } } else { $user = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $user; } public static function getTotalUsers($ignoreAdmin = false, $status = "") { if (!Permissions::canAdminUsers() && !$ignoreAdmin) { return false; } //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT id FROM users WHERE 1=1 "; if (!empty($status)) { if (strtolower($status) === 'i') { $sql .= " AND status = 'i' "; } else { $sql .= " AND status = 'a' "; } } $sql .= BootGrid::getSqlSearchFromPost(array('name', 'email', 'user')); $res = sqlDAL::readSql($sql); $result = sqlDal::num_rows($res); sqlDAL::close($res); return $result; } public static function userExists($user) { global $global; $user = ($user); $sql = "SELECT * FROM users WHERE user = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($user)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { return $user['id']; } else { return false; } } public static function idExists($users_id) { global $global; $users_id = intval($users_id); $sql = "SELECT * FROM users WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($users_id)); $user = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($user != false) { return $user['id']; } else { return false; } } public static function createUserIfNotExists($user, $pass, $name, $email, $photoURL, $isAdmin = false, $emailVerified = false) { global $global, $advancedCustomUser; $userId = 0; if (!$userId = self::userExists($user)) { if (empty($pass)) { $pass = uniqid(); } $pass = encryptPassword($pass); $userObject = new User(0, $user, $pass); $userObject->setEmail($email); $userObject->setName($name); $userObject->setIsAdmin($isAdmin); $userObject->setPhotoURL($photoURL); $userObject->setEmailVerified($emailVerified); $userId = $userObject->save(); if (!empty($userId)) { if (!empty($advancedCustomUser->userDefaultUserGroup->value)) { // for new users use the default usergroup UserGroups::updateUserGroups($userId, array($advancedCustomUser->userDefaultUserGroup->value), true); } } return $userId; } else { if ($emailVerified) { $userObj = new User($userId); if (!$userObj->getEmailVerified()) { $userObj->setEmailVerified(1); $userObj->save(); } } } return $userId; } public function getRecoverPass() { return $this->recoverPass; } public function setRecoverPass($forceChange = false) { // let the same recover pass if it was 10 minutes ago if (!$this->isRecoverPassExpired($this->recoverPass) && empty($forceChange) && !empty($this->recoverPass) && !empty($recoverPass) && !empty($this->modified) && strtotime($this->modified) > strtotime("-10 minutes")) { return $this->recoverPass; } $this->recoverPass = $this->createRecoverPass(); return $this->recoverPass; } private function createRecoverPass($secondsValid = 600) { $json = new stdClass(); $json->valid = strtotime("+{$secondsValid} seconds"); return encryptString(json_encode($json)); } function checkRecoverPass($recoverPass) { if ($this->recoverPass === $recoverPass) { if (!$this->isRecoverPassExpired($recoverPass)) { _error_log('checkRecoverPass success: ' . $this->user . ' ' . getRealIpAddr()); return true; } } return false; } function isRecoverPassExpired($recoverPass) { $string = decryptString($recoverPass); if ($string) { $json = _json_decode($string); if (is_object($json)) { if (time() < $json->valid) { return false; } } } return true; } public static function canUpload($doNotCheckPlugins = false) { global $global, $config, $advancedCustomUser; if (Permissions::canModerateVideos()) { return true; } if (User::isAdmin()) { return true; } if (empty($doNotCheckPlugins) && !AVideoPlugin::userCanUpload(User::getId())) { return false; } if (isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && !User::isVerified()) { return false; } if ($config->getAuthCanUploadVideos()) { return self::isLogged(); } if (self::isLogged() && !empty($_SESSION['user']['canUpload'])) { return true; } return self::isAdmin(); } public static function canViewChart() { global $global, $config; if (self::isLogged() && !empty($_SESSION['user']['canViewChart'])) { return true; } return self::isAdmin(); } public static function canCreateMeet() { global $global, $config; if (self::isLogged() && !empty($_SESSION['user']['canCreateMeet'])) { return true; } return self::isAdmin(); } public static function canComment() { global $global, $config, $advancedCustomUser; if (self::isAdmin()) { return true; } if (Permissions::canAdminComment()) { return true; } if ($config->getAuthCanComment()) { if (empty($advancedCustomUser->unverifiedEmailsCanNOTComment)) { return self::isLogged(); } else { return self::isVerified(); } } return false; } public static function canSeeCommentTextarea() { global $global, $config; if (!$config->getAuthCanComment()) { if (!self::isAdmin()) { return false; } } return true; } public function getUserGroups() { return $this->userGroups; } public function setUserGroups($userGroups) { if (is_array($userGroups)) { $this->userGroups = $userGroups; } } public function getIsAdmin() { return $this->isAdmin; } public function getStatus() { return $this->status; } /** * * @param type $user_id * text * label Default Primary Success Info Warning Danger */ public static function getTags($user_id) { $user = new User($user_id); $tags = array(); if ($user->getIsAdmin()) { $obj = new stdClass(); $obj->type = "info"; $obj->text = __("Admin"); $tags[] = $obj; } else { $obj = new stdClass(); $obj->type = "default"; $obj->text = __("Regular User"); $tags[] = $obj; } if ($user->getStatus() == "a") { $obj = new stdClass(); $obj->type = "success"; $obj->text = __("Active"); $tags[] = $obj; } else { $obj = new stdClass(); $obj->type = "danger"; $obj->text = __("Inactive"); $tags[] = $obj; } if ($user->getEmailVerified()) { $obj = new stdClass(); $obj->type = "success"; $obj->text = __("E-mail Verified"); $tags[] = $obj; } else { $obj = new stdClass(); $obj->type = "warning"; $obj->text = __("E-mail Not Verified"); $tags[] = $obj; } global $global; if (!empty($global['systemRootPath'])) { require_once $global['systemRootPath'] . 'objects/userGroups.php'; } else { require_once 'userGroups.php'; } $groups = UserGroups::getUserGroups($user_id); foreach ($groups as $value) { $obj = new stdClass(); $obj->type = "warning"; $obj->text = $value['group_name']; $tags[] = $obj; } return $tags; } public function getBackgroundURL() { global $global; $this->backgroundURL = self::getBackgroundURLFromUserID($this->id); return $this->backgroundURL; } public static function getBackgroundURLFromUserID($users_id = 0) { if (empty($users_id)) { $users_id = User::getId(); } global $global; $backgroundURL = "videos/userPhoto/background{$users_id}.jpg"; if (!file_exists($global['systemRootPath'] . $backgroundURL)) { $backgroundURL = "videos/userPhoto/background{$users_id}.png"; } if (!file_exists($global['systemRootPath'] . $backgroundURL)) { $backgroundURL = "view/img/background.jpg"; } return $backgroundURL; } public function setBackgroundURL($backgroundURL) { $this->backgroundURL = strip_tags($backgroundURL); } public function getChannelName() { if (empty($this->channelName)) { $this->channelName = self::_recommendChannelName($this->channelName); $this->save(); } return $this->channelName; } public static function _getUserChannelName($users_id = 0) { global $global, $config; if (empty($users_id)) { $users_id = self::getId(); } $user = new User($users_id); if (empty($user)) { return false; } return $user->getChannelName(); } public function getEmailVerified() { return intval($this->emailVerified); } public static function validateChannelName($channelName) { return trim(preg_replace("/[^0-9A-Z_]/i", "", ucwords($channelName))); } /** * * @param type $channelName * @return boolean return true is is unique */ public function setChannelName($channelName) { $channelName = self::validateChannelName($channelName); $user = static::getChannelOwner($channelName); if (!empty($user)) { // if the channel name exists and it is not from this user, rename the channel name if (empty($this->id) || $user['id'] != $this->id) { return false; } } $this->channelName = xss_esc($channelName); return true; } public function setEmailVerified($emailVerified) { $this->emailVerified = (empty($emailVerified) || strtolower($emailVerified) === 'false') ? 0 : 1; } public static function getChannelLink($users_id = 0) { global $global; $name = self::_getChannelName($users_id); if (empty($name)) { return false; } $link = "{$global['webSiteRootURL']}channel/" . urlencode($name); return $link; } public static function getChannelLinkFromChannelName($channelName) { global $global; $link = "{$global['webSiteRootURL']}channel/" . urlencode($channelName); return $link; } public static function _getChannelName($users_id = 0) { global $global, $config; if (empty($users_id)) { $users_id = self::getId(); } $user = new User($users_id); if (empty($user)) { return false; } if (empty($user->getChannelName())) { $name = $user->getBdId(); } else { $name = $user->getChannelName(); } return $name; } public static function sendVerificationLink($users_id) { global $global, $advancedCustomUser; //Only send the verification email each 30 minutes if (!empty($_SESSION["sendVerificationLink"][$users_id]) && time() - $_SESSION["sendVerificationLink"][$users_id] > 1800) { _error_log("sendVerificationLink: Email already sent, we will wait 30 min {$users_id}"); return true; } $config = new Configuration(); $user = new User($users_id); $code = urlencode(static::createVerificationCode($users_id)); //Create a new PHPMailer instance if (!is_object($config)) { _error_log("sendVerificationLink: config is not a object " . json_encode($config)); return false; } $contactEmail = $config->getContactEmail(); $webSiteTitle = $config->getWebSiteTitle(); $email = $user->getEmail(); try { $mail = new \PHPMailer\PHPMailer\PHPMailer; setSiteSendMessage($mail); //$mail->SMTPDebug = 4; //Set who the message is to be sent from $mail->setFrom($contactEmail, $webSiteTitle); //Set who the message is to be sent to $mail->addAddress($email); //Set the subject line $mail->Subject = __('Please Verify Your E-mail ') . $webSiteTitle; $msg = sprintf(__("Hi %s"), $user->getName()); $msg .= "

" . __($advancedCustomUser->verificationMailTextLine1); $msg .= "

" . sprintf(__($advancedCustomUser->verificationMailTextLine2), $webSiteTitle); $msg .= "

" . sprintf(__($advancedCustomUser->verificationMailTextLine3), $webSiteTitle); $msg .= "

" . sprintf(__($advancedCustomUser->verificationMailTextLine4)); $msg .= "

" . " " . __("Verify") . ""; $mail->msgHTML($msg); $resp = $mail->send(); if (!$resp) { _error_log("sendVerificationLink Error Info: {$mail->ErrorInfo}"); } else { _session_start(); $_SESSION["sendVerificationLink"][$users_id] = time(); } return $resp; } catch (phpmailerException $e) { _error_log($e->errorMessage()); //Pretty error messages from PHPMailer } catch (Exception $e) { _error_log($e->getMessage()); //Boring error messages from anything else! } return false; } public static function verifyCode($code) { global $global; $obj = static::decodeVerificationCode($code); $salt = hash('sha256', $global['salt']); if ($salt !== $obj->salt) { return false; } $user = new User($obj->users_id); $recoverPass = $user->getRecoverPass(); if ($recoverPass == $obj->recoverPass) { $user->setEmailVerified(1); return $user->save(); } return false; } public static function createVerificationCode($users_id) { global $global; $obj = new stdClass(); $obj->users_id = $users_id; $obj->salt = hash('sha256', $global['salt']); $user = new User($users_id); $obj->recoverPass = $user->setRecoverPass(); $user->save(); return base64_encode(json_encode($obj)); } public static function decodeVerificationCode($code) { $obj = _json_decode(base64_decode($code)); return $obj; } public function getFirst_name() { return $this->first_name; } public function getLast_name() { return $this->last_name; } public function getAddress() { return $this->address; } public function getZip_code() { return $this->zip_code; } public function getCountry() { return $this->country; } public function getRegion() { return $this->region; } public function getCity() { return $this->city; } public function setFirst_name($first_name) { $this->first_name = $first_name; } public function setLast_name($last_name) { $this->last_name = $last_name; } public function setAddress($address) { $this->address = $address; } public function setZip_code($zip_code) { $this->zip_code = $zip_code; } public function setCountry($country) { $this->country = $country; } public function setRegion($region) { $this->region = $region; } public function setCity($city) { $this->city = $city; } public static function getDocumentImage($users_id) { $row = static::getBlob($users_id, User::$DOCUMENT_IMAGE_TYPE); if (!empty($row['blob'])) { return $row['blob']; } return false; } public static function saveDocumentImage($image, $users_id) { $row = static::saveBlob($image, $users_id, User::$DOCUMENT_IMAGE_TYPE); if (!empty($row['blob'])) { return $row['blob']; } return false; } public static function getBlob($users_id, $type) { global $global; $sql = "SELECT * FROM users_blob WHERE users_id = ? AND `type` = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "is", array($users_id, $type)); $result = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $result; } public static function saveBlob($blob, $users_id, $type) { global $global; $row = self::getBlob($users_id, $type); $null = null; if (!empty($row['id'])) { $sql = "UPDATE users_blob SET `blob` = ? , modified = now() WHERE id = ?"; $stmt = $global['mysqli']->prepare($sql); $stmt->bind_param('bi', $null, $row['id']); } else { $sql = "INSERT INTO users_blob (`blob`, users_id, `type`, modified, created) VALUES (?,?,?, now(), now())"; $stmt = $global['mysqli']->prepare($sql); $stmt->bind_param('bis', $null, $users_id, $type); } $stmt->send_long_data(0, $blob); return $stmt->execute(); } public static function deleteBlob($users_id, $type) { global $global; $row = self::getBlob($users_id, $type); if (!empty($row['id'])) { $sql = "DELETE FROM users_blob "; $sql .= " WHERE id = ?"; $global['lastQuery'] = $sql; //_error_log("Delete Query: ".$sql); return sqlDAL::writeSql($sql, "i", array($row['id'])); } _error_log("Id for table users_blob not defined for deletion"); return false; } public function getDonationLink() { return $this->donationLink; } public function getDonationLinkIfEnabled() { global $advancedCustomUser; if ($advancedCustomUser->allowDonationLink) { return $this->donationLink; } return false; } public function setDonationLink($donationLink) { $this->donationLink = $donationLink; } public static function donationLink() { if (self::isLogged()) { return $_SESSION['user']['donationLink']; } else { return false; } } public static function loginFromRequest() { inputToRequest(); if (!empty($_REQUEST['do_not_login'])) { return false; } if(empty($_REQUEST['pass']) && !empty($_REQUEST['password'])){ $_REQUEST['pass'] = $_REQUEST['password']; } if (!empty($_REQUEST['user']) && !empty($_REQUEST['pass'])) { $user = new User(0, $_REQUEST['user'], $_REQUEST['pass']); $user->login(false, !empty($_REQUEST['encodedPass'])); $_REQUEST['do_not_login'] = 1; } } public static function loginFromRequestToGet() { if (!empty($_REQUEST['user']) && !empty($_REQUEST['pass'])) { $return = "user={$_REQUEST['user']}&pass={$_REQUEST['pass']}"; if (!empty($_REQUEST['encodedPass'])) { $return .= "&encodedPass=" . intval($_REQUEST['encodedPass']); } return $return; } return ""; } public static function getBlockUserButton($users_id) { $canBlock = self::userCanBlockUserWithReason($users_id); if (!$canBlock->result) { return ""; } return ReportVideo::buttonBlockUser($users_id); } public static function getActionBlockUserButton($users_id) { $canBlock = self::userCanBlockUserWithReason($users_id); if (!$canBlock->result) { return ""; } return ReportVideo::actionButtonBlockUser($users_id); } public static function userCanBlockUser($users_id, $ignoreIfIsAlreadyBLocked = false) { if (empty($users_id)) { return false; } if (!User::isLogged()) { return false; } if ($users_id == User::getId()) { return false; } if (empty($ignoreIfIsAlreadyBLocked)) { $report = AVideoPlugin::getDataObjectIfEnabled("ReportVideo"); if (empty($report)) { return false; } } return true; } public static function userCanBlockUserWithReason($users_id, $ignoreIfIsAlreadyBLocked = false) { $obj = new stdClass(); $obj->result = false; $obj->msg = "Unkonw"; if (empty($users_id)) { $obj->msg = "Empty User ID"; return $obj; } if (!User::isLogged()) { $obj->msg = "You are not logged"; return $obj; } if ($users_id == User::getId()) { $obj->msg = "You cannot block your own video"; return $obj; } if (empty($ignoreIfIsAlreadyBLocked)) { $report = AVideoPlugin::getDataObjectIfEnabled("ReportVideo"); if (empty($report)) { $obj->msg = "this user is already blocked"; return $obj; } } $obj->result = true; $obj->msg = "You can block"; return $obj; } public static function hasBlockedUser($reported_users_id, $users_id = 0) { if (empty($users_id)) { $users_id = User::getId(); } if (!self::userCanBlockUser($reported_users_id, true)) { return false; } $report = AVideoPlugin::getDataObjectIfEnabled("ReportVideo"); if (!empty($report)) { return ReportVideo::isBlocked($reported_users_id, $users_id); } else { return false; } } public function updateUserImages($params = array()) { $id = $this->id; $obj = new stdClass(); // Update Background Image if (isset($params['backgroundImg']) && $params['backgroundImg'] != '') { $background = url_get_contents($params['backgroundImg']); $ext = pathinfo(parse_url($params['backgroundImg'], PHP_URL_PATH), PATHINFO_EXTENSION); $allowed = array('jpg', 'jpeg', 'gif', 'png'); if (!in_array(strtolower($ext), $allowed)) { return "File extension error background Image, We allow only (" . implode(",", $allowed) . ")"; } $backgroundPath = "videos/userPhoto/tmp_background{$id}." . $ext; $oldfile = "videos/userPhoto/background{$id}.png"; $file = "videos/userPhoto/background{$id}.jpg"; if (!isset($global['systemRootPath'])) { $global['systemRootPath'] = '../../'; } $filePath = $global['systemRootPath'] . $backgroundPath; $updateBackground = file_put_contents($filePath, $background); convertImage($filePath, $global['systemRootPath'] . $file, 70); if (file_exists($filePath)) { unlink($filePath); } if (file_exists($oldfile)) { unlink($oldfile); } if ($updateBackground) { $obj->background = 'Background has been updated!'; } else { $obj->background = 'Error updating background.'; } $this->setBackgroundURL($file); } // Update Profile Image if (isset($params['profileImg']) && $params['profileImg'] != '') { $photo = url_get_contents($params['profileImg']); $photoPath = "videos/userPhoto/photo{$id}.png"; if (!isset($global['systemRootPath'])) { $global['systemRootPath'] = '../../'; } $filePath = $global['systemRootPath'] . $photoPath; if (file_exists($filePath)) { unlink($filePath); } $updateProfile = file_put_contents($filePath, $photo); if ($updateProfile) { $obj->profile = 'Profile has been updated!'; } else { $obj->profile = 'Error updating profile.'; } $this->setPhotoURL($photoPath); } $formats = "ssi"; $values[] = $this->photoURL; $values[] = $this->backgroundURL; $values[] = $this->id; $sql = "UPDATE users SET " . "photoURL = ?, backgroundURL = ?, " . " modified = now() WHERE id = ?"; $insert_row = sqlDAL::writeSql($sql, $formats, $values); $obj->save = $insert_row; // create/update data for photoURL / backgroundURL return $obj; } function getExtra_info() { return $this->extra_info; } function setExtra_info($extra_info) { $this->extra_info = $extra_info; } static function saveExtraInfo($string, $users_id) { $sql = "UPDATE users SET " . "extra_info = ?, " . " modified = now() WHERE id = ?"; return sqlDAL::writeSql($sql, "si", array($string, $users_id)); } static function userGroupsMatch($user_groups, $users_id=0){ if(empty($users_id)){ $users_id = User::getId(); } if(empty($user_groups)){ return true; } if(empty($users_id)){ return false; } if(!is_array($user_groups)){ $user_groups = array($user_groups); } $user_users_groups = UserGroups::getUserGroups($users_id); if(empty($user_users_groups)){ return false; } foreach ($user_users_groups as $value) { if(in_array($value['id'], $user_groups)){ return true; } } return false; } } diff --git a/objects/video.php b/objects/video.php index ff3ba945d..97c703c55 100644 --- a/objects/video.php +++ b/objects/video.php @@ -1,4243 +1,4246 @@ 'Active', 'k' => 'Active and Encoding', 'i' => 'Inactive', 'e' => 'Encoding', 'x' => 'Encoding Error', 'd' => 'Downloading', 't' => 'Transfering', 'u' => 'Unlisted', 'r' => 'Recording'); public static $statusActive = 'a'; public static $statusActiveAndEncoding = 'k'; public static $statusInactive = 'i'; public static $statusEncoding = 'e'; public static $statusEncodingError = 'x'; public static $statusDownloading = 'd'; public static $statusTranfering = 't'; public static $statusUnlisted = 'u'; public static $statusRecording = 'r'; public static $rratingOptions = array('', 'g', 'pg', 'pg-13', 'r', 'nc-17', 'ma'); //ver 3.4 private $youtubeId; public static $typeOptions = array('audio', 'video', 'embed', 'linkVideo', 'linkAudio', 'torrent', 'pdf', 'image', 'gallery', 'article', 'serie', 'image', 'zip', 'notfound', 'blockedUser'); public function __construct($title = "", $filename = "", $id = 0) { global $global; $this->rotation = 0; $this->zoom = 1; if (!empty($id)) { $this->load($id); } if (!empty($title)) { $this->setTitle($title); } if (!empty($filename)) { $this->filename = $filename; } } public function addView($currentTime = 0) { global $global; if (empty($this->id)) { return false; } $sql = "UPDATE videos SET views_count = views_count+1, modified = now() WHERE id = ?"; $insert_row = sqlDAL::writeSql($sql, "i", array($this->id)); if ($insert_row) { $obj = new stdClass(); $obj->videos_statistics_id = VideoStatistic::create($this->id, $currentTime); $obj->videos_id = $this->id; $this->views_count++; AVideoPlugin::addView($this->id, $this->views_count); return $obj; } die($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } public function updateViewsCount($total) { global $global; if (empty($this->id)) { return false; } $total = intval($total); if ($total < 0) { return false; } $sql = "UPDATE videos SET views_count = {$total}, modified = now() WHERE id = ?"; $insert_row = sqlDAL::writeSql($sql, "i", array($this->id)); if ($insert_row) { return $insert_row; } die($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } public function addViewPercent($percent = 25) { global $global; if (empty($this->id)) { return false; } $sql = "UPDATE videos SET views_count_{$percent} = IFNULL(views_count_{$percent}, 0)+1, modified = now() WHERE id = ?"; $insert_row = sqlDAL::writeSql($sql, "i", array($this->id)); if ($insert_row) { return true; } die($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } // allow users to count a view again in case it is refreshed public static function unsetAddView($videos_id) { // allow users to count a view again in case it is refreshed if (!empty($_SESSION['addViewCount'][$videos_id]['time']) && $_SESSION['addViewCount'][$videos_id]['time'] <= time()) { _session_start(); unset($_SESSION['addViewCount'][$videos_id]); } } public function load($id) { $video = self::getVideoLight($id); if (empty($video)) { return false; } foreach ($video as $key => $value) { $this->$key = $value; } } function getLive_transmitions_history_id() { return $this->live_transmitions_history_id; } function setLive_transmitions_history_id($live_transmitions_history_id) { AVideoPlugin::onVideoSetLive_transmitions_history_id($this->id, $this->live_transmitions_history_id, intval($live_transmitions_history_id)); $this->live_transmitions_history_id = intval($live_transmitions_history_id); } public function getEncoderURL() { return $this->encoderURL; } public function getFilepath() { return $this->filepath; } public function getFilesize() { return intval($this->filesize); } public function setEncoderURL($encoderURL) { if (filter_var($encoderURL, FILTER_VALIDATE_URL) !== false) { AVideoPlugin::onVideoSetEncoderURL($this->id, $this->encoderURL, $encoderURL); $this->encoderURL = $encoderURL; } } public function setFilepath($filepath) { AVideoPlugin::onVideoSetFilepath($this->id, $this->filepath, $filepath); $this->filepath = $filepath; } public function setFilesize($filesize) { AVideoPlugin::onVideoSetFilesize($this->id, $this->filesize, $filesize); $this->filesize = intval($filesize); } public function setUsers_id($users_id) { AVideoPlugin::onVideoSetUsers_id($this->id, $this->users_id, $users_id); $this->users_id = $users_id; } public function getSites_id() { return $this->sites_id; } public function setSites_id($sites_id) { AVideoPlugin::onVideoSetSites_id($this->id, $this->sites_id, $sites_id); $this->sites_id = $sites_id; } public function getVideo_password() { return trim($this->video_password); } public function setVideo_password($video_password) { AVideoPlugin::onVideoSetVideo_password($this->id, $this->video_password, $video_password); $this->video_password = trim($video_password); } public function save($updateVideoGroups = false, $allowOfflineUser = false) { global $advancedCustom; global $global; if (!User::isLogged() && !$allowOfflineUser) { _error_log('Video::save permission denied to save'); return false; } if (empty($this->title)) { $this->title = uniqid(); } $this->clean_title = substr($this->clean_title, 0, 187); if (empty($this->clean_title)) { $this->setClean_title($this->title); } $this->clean_title = self::fixCleanTitle($this->clean_title, 1, $this->id); if (empty($this->status)) { $this->status = 'e'; } if (empty($this->type) || !in_array($this->type, self::$typeOptions)) { $this->type = 'video'; } if (empty($this->isSuggested)) { $this->isSuggested = 0; } else { $this->isSuggested = 1; } if (empty($this->categories_id)) { $p = AVideoPlugin::loadPluginIfEnabled("PredefinedCategory"); $category = Category::getCategoryDefault(); $categories_id = $category['id']; if (empty($categories_id)) { $categories_id = 'NULL'; } if ($p) { $this->categories_id = $p->getCategoryId(); } else { $this->categories_id = $categories_id; } if (empty($this->categories_id)) { $this->categories_id = $categories_id; } } // check if category exists $cat = new Category($this->categories_id); if (empty($cat->getName())) { $catDefault = Category::getCategoryDefault(); $this->categories_id = $catDefault['id']; } $this->setTitle($global['mysqli']->real_escape_string(trim($this->title))); $this->description = ($global['mysqli']->real_escape_string($this->description)); if (forbiddenWords($this->title) || forbiddenWords($this->description)) { return false; } if (empty($this->users_id)) { $this->users_id = User::getId(); } $this->next_videos_id = intval($this->next_videos_id); if (empty($this->next_videos_id)) { $this->next_videos_id = 'NULL'; } $this->sites_id = intval($this->sites_id); if (empty($this->sites_id)) { $this->sites_id = 'NULL'; } $this->serie_playlists_id = intval($this->serie_playlists_id); if (empty($this->serie_playlists_id)) { $this->serie_playlists_id = 'NULL'; } if (empty($this->filename)) { $prefix = $this->type; if (empty($prefix)) { $prefix = 'v'; } $paths = self::getNewVideoFilename($prefix); $this->filename = $paths['filename']; } $this->can_download = intval($this->can_download); $this->can_share = intval($this->can_share); $this->only_for_paid = intval($this->only_for_paid); $this->filesize = intval($this->filesize); $this->rate = floatval($this->rate); if (!filter_var($this->videoLink, FILTER_VALIDATE_URL)) { $this->videoLink = ''; if ($this->type == 'embed') { $this->type = 'video'; } } if (empty($this->live_transmitions_history_id)) { $this->live_transmitions_history_id = 'NULL'; } if (!empty($this->id)) { if (!$this->userCanManageVideo() && !$allowOfflineUser && !Permissions::canModerateVideos()) { header('Content-Type: application/json'); die('{"error":"3 ' . __("Permission denied") . '"}'); } $sql = "UPDATE videos SET title = '{$this->title}',clean_title = '{$this->clean_title}'," . " filename = '{$this->filename}', categories_id = '{$this->categories_id}', status = '{$this->status}'," . " description = '{$this->description}', duration = '{$this->duration}', type = '{$this->type}', videoDownloadedLink = '{$this->videoDownloadedLink}', youtubeId = '{$this->youtubeId}', videoLink = '{$this->videoLink}', next_videos_id = {$this->next_videos_id}, isSuggested = {$this->isSuggested}, users_id = {$this->users_id}, " . " trailer1 = '{$this->trailer1}', trailer2 = '{$this->trailer2}', trailer3 = '{$this->trailer3}', rate = '{$this->rate}', can_download = '{$this->can_download}', can_share = '{$this->can_share}', only_for_paid = '{$this->only_for_paid}', rrating = '{$this->rrating}', externalOptions = '{$this->externalOptions}', sites_id = {$this->sites_id}, serie_playlists_id = {$this->serie_playlists_id} ,live_transmitions_history_id = {$this->live_transmitions_history_id} , video_password = '{$this->video_password}', " . " encoderURL = '{$this->encoderURL}', filepath = '{$this->filepath}' , filesize = '{$this->filesize}' , modified = now()" . " WHERE id = {$this->id}"; $saved = sqlDAL::writeSql($sql); if ($saved) { $insert_row = $this->id; } } else { $sql = "INSERT INTO videos " . "(title,clean_title, filename, users_id, categories_id, status, description, duration,type,videoDownloadedLink, next_videos_id, created, modified, videoLink, can_download, can_share, only_for_paid, rrating, externalOptions, sites_id, serie_playlists_id,live_transmitions_history_id, video_password, encoderURL, filepath , filesize) values " . "('{$this->title}','{$this->clean_title}', '{$this->filename}', {$this->users_id},{$this->categories_id}, '{$this->status}', '{$this->description}', '{$this->duration}', '{$this->type}', '{$this->videoDownloadedLink}', {$this->next_videos_id},now(), now(), '{$this->videoLink}', '{$this->can_download}', '{$this->can_share}','{$this->only_for_paid}', '{$this->rrating}', '$this->externalOptions', {$this->sites_id}, {$this->serie_playlists_id},{$this->live_transmitions_history_id}, '{$this->video_password}', '{$this->encoderURL}', '{$this->filepath}', '{$this->filesize}')"; $insert_row = sqlDAL::writeSql($sql); } if ($insert_row) { _error_log("Video::save ({$this->title}) Saved id = {$insert_row} "); Category::clearCacheCount(); if (empty($this->id)) { $id = $global['mysqli']->insert_id; $this->id = $id; // check if needs to add the video in a user group $p = AVideoPlugin::loadPluginIfEnabled("PredefinedCategory"); if ($p) { $updateVideoGroups = true; $this->videoGroups = $p->getUserGroupsArray(); } } else { $id = $this->id; } ObjectYPT::deleteCache("getItemprop{$this->id}"); ObjectYPT::deleteCache("getLdJson{$this->id}"); ObjectYPT::deleteCache("getVideoTags{$this->id}"); self::deleteTagsAsync($this->id); if ($updateVideoGroups) { require_once $global['systemRootPath'] . 'objects/userGroups.php'; // update the user groups UserGroups::updateVideoGroups($id, $this->videoGroups); } // I am not sure what is it for //Video::autosetCategoryType($id); if (!empty($this->old_categories_id)) { //Video::autosetCategoryType($this->old_categories_id); } self::clearCache($this->id); return $id; } _error_log('Video::save ' . $sql . ' Save Video Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error . " $sql"); return false; } // i would like to simplify the big part of the method above in this method, but won't work as i want. public static function internalAutoset($catId, $videoFound, $audioFound) { global $config; if ($config->currentVersionLowerThen('5.01')) { return false; } $sql = "SELECT type,categories_id FROM `videos` WHERE categories_id = ?;"; $res = sqlDAL::readSql($sql, "i", array($catId)); $fullResult2 = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($fullResult2 as $row) { if ($row['type'] == "audio") { $audioFound = true; } elseif ($row['type'] == "video") { $videoFound = true; } } } if (($videoFound == false) || ($audioFound == false)) { $sql = "SELECT parentId,categories_id FROM `categories` WHERE parentId = ?;"; $res = sqlDAL::readSql($sql, "i", array($catId)); $fullResult2 = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($fullResult2 as $cat) { $sql = "SELECT type,categories_id FROM `videos` WHERE categories_id = ?;"; $res = sqlDAL::readSql($sql, "i", array($cat['parentId'])); $fullResult = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); if ($res != false) { foreach ($fullResult as $row) { if ($row['type'] == 'audio') { $audioFound = true; } elseif ($row['type'] == 'video') { $videoFound = true; } } } } } } return array($videoFound, audioFound); } public function setClean_title($clean_title) { if (preg_match("/video-automatically-booked/i", $clean_title) && !empty($this->clean_title)) { return false; } $clean_title = cleanURLName($clean_title); AVideoPlugin::onVideoSetClean_title($this->id, $this->clean_title, $clean_title); $this->clean_title = $clean_title; } public function setDuration($duration) { AVideoPlugin::onVideoSetDuration($this->id, $this->duration, $duration); $this->duration = $duration; } public function getDuration() { return $this->duration; } public function getIsSuggested() { return $this->isSuggested; } public function setIsSuggested($isSuggested) { if (empty($isSuggested) || $isSuggested === "false") { $new_isSuggested = 0; } else { $new_isSuggested = 1; } AVideoPlugin::onVideoSetIsSuggested($this->id, $this->isSuggested, $new_isSuggested); $this->isSuggested = $new_isSuggested; } public function setStatus($status) { if (!empty($this->id)) { global $global; if (empty(Video::$statusDesc[$status])) { _error_log("Video::setStatus({$status}) NOT found ", AVideoLog::$WARNING); return false; } _error_log("Video::setStatus({$status}) " . json_encode(debug_backtrace()), AVideoLog::$WARNING); $sql = "UPDATE videos SET status = ?, modified = now() WHERE id = ? "; $res = sqlDAL::writeSql($sql, 'si', array($status, $this->id)); if ($global['mysqli']->errno != 0) { die('Error on update Status: (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } self::deleteTagsAsync($this->id); } AVideoPlugin::onVideoSetStatus($this->id, $this->status, $status); $this->status = $status; return $status; } public function setAutoStatus($default = 'a') { global $advancedCustom; if (empty($advancedCustom)) { $advancedCustom = AVideoPlugin::getDataObject('CustomizeAdvanced'); } if (!empty($_POST['fail'])) { return $this->setStatus(Video::$statusEncodingError); } else { if (!empty($_REQUEST['overrideStatus'])) { return $this->setStatus($_REQUEST['overrideStatus']); } else { // encoder did not provide a status if (!empty($_REQUEST['keepEncoding'])) { return $this->setStatus(Video::$statusActiveAndEncoding); } else { if ($this->getTitle() !== "Video automatically booked") { if (!empty($advancedCustom->makeVideosInactiveAfterEncode)) { return $this->setStatus(Video::$statusInactive); } elseif (!empty($advancedCustom->makeVideosUnlistedAfterEncode)) { return $this->setStatus(Video::$statusUnlisted); } } else { return $this->setStatus(Video::$statusInactive); } } } } return $this->setStatus($default); } public function setType($type, $force = true) { if ($force || empty($this->type)) { AVideoPlugin::onVideoSetType($this->id, $this->type, $type, $force); $this->type = $type; } } public function setRotation($rotation) { $saneRotation = intval($rotation) % 360; AVideoPlugin::onVideoSetRotation($this->id, $this->rotation, $saneRotation); if (!empty($this->id)) { global $global; $sql = "UPDATE videos SET rotation = '{$saneRotation}', modified = now() WHERE id = {$this->id} "; $res = sqlDAL::writeSql($sql); if ($global['mysqli']->errno != 0) { die('Error on update Rotation: (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } } $this->rotation = $saneRotation; } public function getRotation() { return $this->rotation; } public function getUsers_id() { return $this->users_id; } public function setZoom($zoom) { $saneZoom = abs(floatval($zoom)); if ($saneZoom < 0.1 || $saneZoom > 10) { die('Zoom level must be between 0.1 and 10'); } if (!empty($this->id)) { global $global; $sql = "UPDATE videos SET zoom = '{$saneZoom}', modified = now() WHERE id = {$this->id} "; $res = sqlDAL::writeSql($sql); if ($global['mysqli']->errno != 0) { die('Error on update Zoom: (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } } AVideoPlugin::onVideoSetZoom($this->id, $this->zoom, $saneZoom); $this->zoom = $saneZoom; } public function getZoom() { return $this->zoom; } public static function getUserGroupsCanSeeSQL($tableAlias = '') { global $global; if (Permissions::canModerateVideos()) { return ""; } $obj = AVideoPlugin::getDataObject('Subscription'); if ($obj && $obj->allowFreePlayWithAds) { $sql = " AND {$tableAlias}only_for_paid = 0 "; return $sql; } else { $sql = " (SELECT count(id) FROM videos_group_view as gv WHERE gv.videos_id = v.id ) = 0 "; if (User::isLogged()) { require_once $global['systemRootPath'] . 'objects/userGroups.php'; $userGroups = UserGroups::getUserGroups(User::getId()); $groups_id = array(); foreach ($userGroups as $value) { $groups_id[] = $value['id']; } if (!empty($groups_id)) { $sql = " (({$sql}) OR ((SELECT count(id) FROM videos_group_view as gv WHERE gv.videos_id = v.id AND users_groups_id IN ('" . implode("','", $groups_id) . "') ) > 0)) "; } } return " AND " . $sql; } } public static function getVideo($id = "", $status = "viewable", $ignoreGroup = false, $random = false, $suggestedOnly = false, $showUnlisted = false, $ignoreTags = false, $activeUsersOnly = true) { global $global, $config, $advancedCustom, $advancedCustomUser; if ($config->currentVersionLowerThen('5')) { return false; } $status = str_replace("'", "", $status); $id = intval($id); if (AVideoPlugin::isEnabledByName("VideoTags")) { if (!empty($_GET['tags_id']) && empty($videosArrayId)) { $videosArrayId = VideoTags::getAllVideosIdFromTagsId($_GET['tags_id']); } } _mysql_connect(); $sql = "SELECT u.*, v.*, " . " nv.title as next_title," . " nv.clean_title as next_clean_title," . " nv.filename as next_filename," . " nv.id as next_id," - . " c.id as category_id,c.iconClass,c.name as category,c.iconClass, c.clean_name as clean_category,c.description as category_description,c.nextVideoOrder as category_order, v.created as videoCreation, " + . " c.id as category_id,c.iconClass,c.name as category,c.iconClass, c.clean_name as clean_category,c.description as category_description, v.created as videoCreation, " . " (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = 1 ) as likes, " . " (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = -1 ) as dislikes "; if (User::isLogged()) { $sql .= ", (SELECT `like` FROM likes as l where l.videos_id = v.id AND users_id = '" . User::getId() . "' ) as myVote "; } else { $sql .= ", 0 as myVote "; } $sql .= " FROM videos as v " . "LEFT JOIN categories c ON categories_id = c.id " . "LEFT JOIN users u ON v.users_id = u.id " . "LEFT JOIN videos nv ON v.next_videos_id = nv.id " . " WHERE 1=1 "; if ($activeUsersOnly) { $sql .= " AND u.status = 'a' "; } if (!empty($id)) { $sql .= " AND v.id = '$id' "; } $sql .= AVideoPlugin::getVideoWhereClause(); $sql .= static::getVideoQueryFileter(); if (!$ignoreGroup) { $sql .= self::getUserGroupsCanSeeSQL('v.'); } if (!empty($_SESSION['type'])) { if ($_SESSION['type'] == 'video' || $_SESSION['type'] == 'linkVideo') { $sql .= " AND (v.type = 'video' OR v.type = 'embed' OR v.type = 'linkVideo')"; } elseif ($_SESSION['type'] == 'audio') { $sql .= " AND (v.type = 'audio' OR v.type = 'linkAudio')"; } else { $sql .= " AND v.type = '{$_SESSION['type']}' "; } } if (!empty($videosArrayId) && is_array($videosArrayId)) { $sql .= " AND v.id IN ( '" . implode("', '", $videosArrayId) . "') "; } if ($status == "viewable") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } elseif ($status == "viewableNotUnlisted") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus(false)) . "')"; } elseif (!empty($status)) { $sql .= " AND v.status = '{$status}'"; } if (!empty($_GET['catName'])) { $catName = $global['mysqli']->real_escape_string($_GET['catName']); $sql .= " AND (c.clean_name = '{$catName}' OR c.parentId IN (SELECT cs.id from categories cs where cs.clean_name = '{$catName}' ))"; } if (empty($id) && !empty($_GET['channelName'])) { $user = User::getChannelOwner($_GET['channelName']); if (!empty($user['id'])) { $sql .= " AND v.users_id = '{$user['id']}' "; } } if (!empty($_GET['search'])) { $_POST['searchPhrase'] = $_GET['search']; } if (!empty($_POST['searchPhrase'])) { $searchFieldsNames = array('v.title', 'v.description', 'c.name', 'c.description'); if ($advancedCustomUser->videosSearchAlsoSearchesOnChannelName) { $searchFieldsNames[] = 'u.channelName'; } if (AVideoPlugin::isEnabledByName("VideoTags")) { $sql .= " AND ("; $sql .= "v.id IN (select videos_id FROM tags_has_videos LEFT JOIN tags as t ON tags_id = t.id AND t.name LIKE '%{$_POST['searchPhrase']}%' WHERE t.id is NOT NULL)"; $sql .= BootGrid::getSqlSearchFromPost($searchFieldsNames, "OR"); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']); $sql .= ")"; } else { $sql .= ' AND (1=1 ' . BootGrid::getSqlSearchFromPost($searchFieldsNames); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']) . ')'; } } if (!$ignoreGroup) { $arrayNotIN = AVideoPlugin::getAllVideosExcludeVideosIDArray(); if (!empty($arrayNotIN) && is_array($arrayNotIN)) { $sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') "; } } // replace random based on this $firstClauseLimit = ""; if (empty($id)) { if (empty($random) && !empty($_GET['videoName'])) { $sql .= " AND v.clean_title = '{$_GET['videoName']}' "; } elseif (!empty($random)) { $sql .= " AND v.id != {$random} "; $rand = rand(0, self::getTotalVideos($status, false, $ignoreGroup, $showUnlisted, $activeUsersOnly, $suggestedOnly)); $rand = ($rand - 2) < 0 ? 0 : $rand - 2; $firstClauseLimit = "$rand, "; //$sql .= " ORDER BY RAND() "; } elseif ($suggestedOnly && empty($_GET['videoName']) && empty($_GET['search']) && empty($_GET['searchPhrase'])) { $sql .= " AND v.isSuggested = 1 "; $rand = rand(0, self::getTotalVideos($status, false, $ignoreGroup, $showUnlisted, $activeUsersOnly, $suggestedOnly)); $rand = ($rand - 2) < 0 ? 0 : $rand - 2; $firstClauseLimit = "$rand, "; //$sql .= " ORDER BY RAND() "; } elseif (!empty($_GET['v']) && is_numeric($_GET['v'])) { $vid = intval($_GET['v']); $sql .= " AND v.id = {$vid} "; } else { $sql .= " ORDER BY v.Created DESC "; } } if (strpos($sql, 'v.id IN') === false && strpos(strtolower($sql), 'limit') === false) { $sql .= " LIMIT {$firstClauseLimit}1"; } //echo $sql, "
";//exit; $res = sqlDAL::readSql($sql); $video = sqlDAL::fetchAssoc($res); // if there is a search, and there is no data and is inside a channel try again without a channel if (!empty($_GET['search']) && empty($video) && !empty($_GET['channelName'])) { $channelName = $_GET['channelName']; unset($_GET['channelName']); $return = self::getVideo($id, $status, $ignoreGroup, $random, $suggestedOnly, $showUnlisted, $ignoreTags, $activeUsersOnly); $_GET['channelName'] = $channelName; return $return; } sqlDAL::close($res); if ($res != false) { require_once $global['systemRootPath'] . 'objects/userGroups.php'; if (!empty($video)) { $video = cleanUpRowFromDatabase($video); $video['category'] = xss_esc_back($video['category']); $video['groups'] = UserGroups::getVideoGroups($video['id']); $video['title'] = UTF8encode($video['title']); $video['description'] = UTF8encode($video['description']); $video['progress'] = self::getVideoPogressPercent($video['id']); $video['isFavorite'] = self::isFavorite($video['id']); $video['isWatchLater'] = self::isWatchLater($video['id']); $video['favoriteId'] = self::getFavoriteIdFromUser(User::getId()); $video['watchLaterId'] = self::getWatchLaterIdFromUser(User::getId()); if (empty($video['filesize']) && ($video['type'] == "video" || $video['type'] == "audio")) { $video['filesize'] = Video::updateFilesize($video['id']); } if (!$ignoreTags) { $video['tags'] = self::getTags($video['id']); } if (!empty($video['externalOptions'])) { $video['externalOptions'] = _json_decode($video['externalOptions']); } else { $video['externalOptions'] = new stdClass(); } $video['descriptionHTML'] = strip_tags($video['description']) === $video['description'] ? nl2br(textToLink(htmlentities($video['description']))) : $video['description']; if (!$ignoreTags && AVideoPlugin::isEnabledByName("VideoTags")) { $video['videoTags'] = Tags::getAllFromVideosId($video['id']); $video['videoTagsObject'] = Tags::getObjectFromVideosId($video['id']); } } } else { $video = false; } return $video; } public static function getVideoLight($id) { global $global, $config; $id = intval($id); $sql = "SELECT * FROM videos WHERE id = '$id' LIMIT 1"; $res = sqlDAL::readSql($sql, "", array(), true); $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $video; } public static function getTotalVideosSizeFromUser($users_id) { global $global, $config; $users_id = intval($users_id); $sql = "SELECT sum(filesize) as total FROM videos WHERE 1=1 "; if (!empty($users_id)) { $sql .= " AND users_id = '$users_id'"; } $res = sqlDAL::readSql($sql, "", array(), true); $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return intval($video['total']); } public static function getTotalVideosFromUser($users_id) { global $global, $config; $users_id = intval($users_id); $sql = "SELECT count(*) as total FROM videos WHERE 1=1 "; if (!empty($users_id)) { $sql .= " AND users_id = '$users_id'"; } $res = sqlDAL::readSql($sql, "", array(), true); $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return intval($video['total']); } public static function getVideoFromFileName($fileName, $ignoreGroup = false, $ignoreTags = false) { global $global; if (empty($fileName)) { return false; } $parts = explode("/", $fileName); if (!empty($parts[0])) { $fileName = $parts[0]; } $fileName = self::getCleanFilenameFromFile($fileName); $sql = "SELECT id FROM videos WHERE filename = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($fileName)); if ($res != false) { $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if (!empty($video['id'])) { return self::getVideo($video['id'], "", $ignoreGroup, false, false, true, $ignoreTags); } } return false; } public static function getVideoFromFileNameLight($fileName) { global $global; $fileName = self::getCleanFilenameFromFile($fileName); if (empty($fileName)) { return false; } $sql = "SELECT * FROM videos WHERE filename = ? LIMIT 1"; //var_dump($sql, $fileName); $res = sqlDAL::readSql($sql, "s", array($fileName), true); if ($res != false) { $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $video; } return false; } public static function getVideoFromCleanTitle($clean_title) { // even increasing the max_allowed_packet it only goes away when close and reopen the connection global $global; $sql = "SELECT id FROM videos WHERE clean_title = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($clean_title)); $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if (!empty($video) && $res) { return self::getVideo($video['id'], "", true, false, false, true); //$video['groups'] = UserGroups::getVideoGroups($video['id']); } else { return false; } } static function getRelatedMovies($videos_id, $limit = 10) { global $global; $video = self::getVideoLight($videos_id); if(empty($video)){ return false; } $sql = "SELECT * FROM videos v WHERE v.id != {$videos_id} AND v.status='a' AND (categories_id = {$video['categories_id']} "; if (AVideoPlugin::isEnabledByName("VideoTags")) { $sql .= " OR ("; $sql .= "v.id IN (select videos_id FROM tags_has_videos WHERE tags_id IN " . " (SELECT tags_id FROM tags_has_videos WHERE videos_id = {$videos_id}))"; $sql .= ")"; } $sql .= ") "; $sql .= AVideoPlugin::getVideoWhereClause(); $sql .= "ORDER BY RAND() LIMIT {$limit} "; $res = sqlDAL::readSql($sql); $fullData = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $rows = array(); if ($res != false) { foreach ($fullData as $row) { $row['images'] = self::getImageFromFilename($row['filename']); $rows[] = $row; } } else { die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $rows; } /** * * @global type $global * @param type $status * @param type $showOnlyLoggedUserVideos you may pass an user ID to filter results * @param type $ignoreGroup * @param type $videosArrayId an array with videos to return (for filter only) * @return boolean */ public static function getAllVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true, $suggestedOnly = false, $is_serie = null) { global $global, $config, $advancedCustom, $advancedCustomUser; if ($config->currentVersionLowerThen('5')) { return false; } if (!empty($_POST['sort']['suggested'])) { $suggestedOnly = true; } if (AVideoPlugin::isEnabledByName("VideoTags")) { if (!empty($_GET['tags_id']) && empty($videosArrayId)) { TimeLogStart("video::getAllVideos::getAllVideosIdFromTagsId({$_GET['tags_id']})"); $videosArrayId = VideoTags::getAllVideosIdFromTagsId($_GET['tags_id']); TimeLogEnd("video::getAllVideos::getAllVideosIdFromTagsId({$_GET['tags_id']})", __LINE__); } } $status = str_replace("'", "", $status); $sql = "SELECT u.*, v.*, c.iconClass, c.name as category, c.clean_name as clean_category,c.description as category_description, v.created as videoCreation, v.modified as videoModified, " . " (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = 1 ) as likes, " . " (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = -1 ) as dislikes " . " FROM videos as v " . " LEFT JOIN categories c ON categories_id = c.id " . " LEFT JOIN users u ON v.users_id = u.id " . " WHERE 2=2 "; $blockedUsers = self::getBlockedUsersIdsArray(); if (!empty($blockedUsers)) { $sql .= " AND v.users_id NOT IN ('" . implode("','", $blockedUsers) . "') "; } if ($showOnlyLoggedUserVideos === true && !Permissions::canModerateVideos()) { $uid = intval(User::getId()); $sql .= " AND v.users_id = '{$uid}'"; } elseif (!empty($showOnlyLoggedUserVideos)) { $uid = intval($showOnlyLoggedUserVideos); $sql .= " AND v.users_id = '{$uid}'"; } elseif (!empty($_GET['channelName'])) { $user = User::getChannelOwner($_GET['channelName']); $uid = intval($user['id']); $sql .= " AND v.users_id = '{$uid}' "; } if (isset($_REQUEST['is_serie']) && empty($is_serie)) { $is_serie = intval($_REQUEST['is_serie']); } if (isset($is_serie)) { if (empty($is_serie)) { $sql .= " AND v.serie_playlists_id IS NULL "; } else { $sql .= " AND v.serie_playlists_id IS NOT NULL "; } } if (!empty($videosArrayId) && is_array($videosArrayId)) { $sql .= " AND v.id IN ( '" . implode("', '", $videosArrayId) . "') "; } if ($activeUsersOnly) { $sql .= " AND u.status = 'a' "; } $sql .= static::getVideoQueryFileter(); if (!$ignoreGroup) { TimeLogStart("video::getAllVideos::getAllVideosExcludeVideosIDArray"); $arrayNotIN = AVideoPlugin::getAllVideosExcludeVideosIDArray(); if (!empty($arrayNotIN) && is_array($arrayNotIN)) { $sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') "; } TimeLogEnd("video::getAllVideos::getAllVideosExcludeVideosIDArray", __LINE__); } if (!$ignoreGroup) { $sql .= self::getUserGroupsCanSeeSQL('v.'); } if (!empty($_SESSION['type'])) { if ($_SESSION['type'] == 'video' || $_SESSION['type'] == 'linkVideo') { $sql .= " AND (v.type = 'video' OR v.type = 'embed' OR v.type = 'linkVideo')"; } elseif ($_SESSION['type'] == 'videoOnly') { $sql .= " AND (v.type = 'video')"; } elseif ($_SESSION['type'] == 'audio') { $sql .= " AND (v.type = 'audio' OR v.type = 'linkAudio')"; } else { $sql .= " AND v.type = '{$_SESSION['type']}' "; } } if ($status == "viewable") { if (User::isLogged()) { $sql .= " AND (v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "') OR (v.status='u' AND v.users_id ='" . User::getId() . "'))"; } else { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } } elseif ($status == "viewableNotUnlisted") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus(false)) . "')"; } elseif ($status == "publicOnly") { $sql .= " AND v.status IN ('a', 'k') AND (SELECT count(id) FROM videos_group_view as gv WHERE gv.videos_id = v.id ) = 0"; } elseif (!empty($status)) { $sql .= " AND v.status = '{$status}'"; } if (!empty($_GET['catName'])) { $catName = $global['mysqli']->real_escape_string($_GET['catName']); $sql .= " AND (c.clean_name = '{$catName}' OR c.parentId IN (SELECT cs.id from categories cs where cs.clean_name = '{$catName}' ))"; } if (!empty($_GET['search'])) { $_POST['searchPhrase'] = $_GET['search']; } if (!empty($_GET['modified'])) { $_GET['modified'] = str_replace("'", "", $_GET['modified']); $sql .= " AND v.modified >= '{$_GET['modified']}'"; } if (!empty($_POST['searchPhrase'])) { $searchFieldsNames = array('v.title', 'v.description', 'c.name', 'c.description'); if ($advancedCustomUser->videosSearchAlsoSearchesOnChannelName) { $searchFieldsNames[] = 'u.channelName'; } if (AVideoPlugin::isEnabledByName("VideoTags")) { $sql .= " AND ("; $sql .= "v.id IN (select videos_id FROM tags_has_videos LEFT JOIN tags as t ON tags_id = t.id AND t.name LIKE '%{$_POST['searchPhrase']}%' WHERE t.id is NOT NULL)"; $sql .= BootGrid::getSqlSearchFromPost($searchFieldsNames, "OR"); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']); $sql .= ")"; } else { $sql .= ' AND (1=1 ' . BootGrid::getSqlSearchFromPost($searchFieldsNames); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']) . ')'; } } $sql .= AVideoPlugin::getVideoWhereClause(); if ($suggestedOnly) { $sql .= " AND v.isSuggested = 1 "; $sql .= " ORDER BY RAND() "; $sort = @$_POST['sort']; unset($_POST['sort']); $sql .= BootGrid::getSqlFromPost(array(), empty($_POST['sort']['likes']) ? "v." : "", "", true); if (strpos(strtolower($sql), 'limit') === false) { $sql .= " LIMIT 60 "; } $_POST['sort'] = $sort; } elseif (!isset($_POST['sort']['trending']) && !isset($_GET['sort']['trending'])) { if (!empty($_POST['sort']['created']) && !empty($_POST['sort']['likes'])) { $_POST['sort']['v.created'] = $_POST['sort']['created']; unset($_POST['sort']['created']); } $sql .= BootGrid::getSqlFromPost(array(), empty($_POST['sort']['likes']) ? "v." : "", "", true); } else { unset($_POST['sort']['trending'], $_GET['sort']['trending']); $rows = array(); if (!empty($_REQUEST['current']) && $_REQUEST['current'] == 1) { $rows = VideoStatistic::getVideosWithMoreViews($status, $showOnlyLoggedUserVideos, $showUnlisted, $suggestedOnly); } $ids = array(); foreach ($rows as $row) { $ids[] = $row['id']; } if (!empty($ids)) { $sql .= " ORDER BY FIND_IN_SET(v.id, '" . implode(",", $ids) . "') DESC, likes DESC "; } else { $sql .= " ORDER BY likes DESC "; } $sql .= ObjectYPT::getSqlLimit(); } if (strpos(strtolower($sql), 'limit') === false) { if (!empty($_GET['limitOnceToOne'])) { $sql .= " LIMIT 1"; unset($_GET['limitOnceToOne']); } else { $_REQUEST['rowCount'] = getRowCount(); if (!empty($_REQUEST['rowCount'])) { $sql .= " LIMIT {$_REQUEST['rowCount']}"; } else { _error_log("getAllVideos without limit " . json_encode(debug_backtrace())); if (empty($global['limitForUnlimitedVideos'])) { $global['limitForUnlimitedVideos'] = 100; } if ($global['limitForUnlimitedVideos'] > 0) { $sql .= " LIMIT {$global['limitForUnlimitedVideos']}"; } } } } //echo $sql;//exit; //_error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql); $res = sqlDAL::readSql($sql); $fullData = sqlDAL::fetchAllAssoc($res); // if there is a search, and there is no data and is inside a channel try again without a channel if (!empty($_GET['search']) && empty($fullData) && !empty($_GET['channelName'])) { $channelName = $_GET['channelName']; unset($_GET['channelName']); $return = self::getAllVideos($status, $showOnlyLoggedUserVideos, $ignoreGroup, $videosArrayId, $getStatistcs, $showUnlisted, $activeUsersOnly, $suggestedOnly); $_GET['channelName'] = $channelName; return $return; } sqlDAL::close($res); $videos = array(); if ($res != false) { require_once 'userGroups.php'; TimeLogStart("video::getAllVideos foreach"); foreach ($fullData as $row) { $row = cleanUpRowFromDatabase($row); if (!self::canEdit($row['id'])) { if (!empty($row['video_password'])) { $row['video_password'] = 1; } else { $row['video_password'] = 0; } } if ($getStatistcs) { TimeLogStart("video::getAllVideos getStatistcs"); $previewsMonth = date("Y-m-d 00:00:00", strtotime("-30 days")); $previewsWeek = date("Y-m-d 00:00:00", strtotime("-7 days")); $today = date('Y-m-d 23:59:59'); $row['statistc_all'] = VideoStatistic::getStatisticTotalViews($row['id']); $row['statistc_today'] = VideoStatistic::getStatisticTotalViews($row['id'], false, date('Y-m-d 00:00:00'), $today); $row['statistc_week'] = VideoStatistic::getStatisticTotalViews($row['id'], false, $previewsWeek, $today); $row['statistc_month'] = VideoStatistic::getStatisticTotalViews($row['id'], false, $previewsMonth, $today); $row['statistc_unique_user'] = VideoStatistic::getStatisticTotalViews($row['id'], true); TimeLogEnd("video::getAllVideos getStatistcs", __LINE__, 0.5); } TimeLogStart("video::getAllVideos otherInfo"); $otherInfocachename = "otherInfo{$row['id']}"; $otherInfo = object_to_array(ObjectYPT::getCache($otherInfocachename), 600); if (empty($otherInfo)) { $otherInfo = array(); $otherInfo['category'] = xss_esc_back($row['category']); $otherInfo['groups'] = UserGroups::getVideoGroups($row['id']); $otherInfo['tags'] = self::getTags($row['id']); $otherInfo['title'] = UTF8encode($row['title']); $otherInfo['description'] = UTF8encode($row['description']); $otherInfo['descriptionHTML'] = self::htmlDescription($otherInfo['description']); $otherInfo['relatedVideos'] = self::getRelatedMovies($row['id']); if (empty($row['filesize'])) { $otherInfo['filesize'] = Video::updateFilesize($row['id']); } ObjectYPT::setCache($otherInfocachename, $otherInfo); } foreach ($otherInfo as $key => $value) { $row[$key] = $value; } $row['progress'] = self::getVideoPogressPercent($row['id']); $row['isFavorite'] = self::isFavorite($row['id']); $row['isWatchLater'] = self::isWatchLater($row['id']); $row['favoriteId'] = self::getFavoriteIdFromUser(User::getId()); $row['watchLaterId'] = self::getWatchLaterIdFromUser(User::getId()); TimeLogEnd("video::getAllVideos otherInfo", __LINE__, 0.5); TimeLogStart("video::getAllVideos getAllVideosArray"); $row = array_merge($row, AVideoPlugin::getAllVideosArray($row['id'])); TimeLogEnd("video::getAllVideos getAllVideosArray", __LINE__); $videos[] = $row; } $rowCount = getRowCount(); $tolerance = $rowCount / 100; if ($tolerance < 0.2) { $tolerance = 0.2; } else if ($tolerance > 2) { $tolerance = 2; } TimeLogEnd("video::getAllVideos foreach", __LINE__, $tolerance); //$videos = $res->fetch_all(MYSQLI_ASSOC); } else { $videos = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $videos; } public static function htmlDescription($description) { if (strip_tags($description) != $description) { return $description; } else { return nl2br(textToLink(htmlentities($description))); } } public static function isFavorite($videos_id) { if (AVideoPlugin::isEnabledByName("PlayLists")) { return PlayList::isVideoOnFavorite($videos_id, User::getId()); } return false; } public static function isSerie($videos_id) { $v = new Video("", "", $videos_id); return !empty($v->getSerie_playlists_id()); } public static function isWatchLater($videos_id) { if (AVideoPlugin::isEnabledByName("PlayLists")) { return PlayList::isVideoOnWatchLater($videos_id, User::getId()); } return false; } public static function getFavoriteIdFromUser($users_id) { if (AVideoPlugin::isEnabledByName("PlayLists")) { return PlayList::getFavoriteIdFromUser($users_id); } return false; } public static function getWatchLaterIdFromUser($users_id) { if (AVideoPlugin::isEnabledByName("PlayLists")) { return PlayList::getWatchLaterIdFromUser($users_id); } return false; } public static function updateFilesize($videos_id) { global $config; if ($config->currentVersionLowerThen('8.5')) { return false; } TimeLogStart("Video::updateFilesize {$videos_id}"); ini_set('max_execution_time', 300); // 5 set_time_limit(300); $video = new Video("", "", $videos_id); $filename = $video->getFilename(); if (empty($filename) || !($video->getType() == "video" || $video->getType() == "audio" || $video->getType() == "zip" || $video->getType() == "image")) { //_error_log("updateFilesize: Not updated, this filetype is ".$video->getType()); return false; } $filesize = getUsageFromFilename($filename); if (empty($filesize)) { $obj = AVideoPlugin::getObjectDataIfEnabled("DiskUploadQuota"); if (!empty($obj->deleteVideosWith0Bytes)) { try { _error_log("updateFilesize: DELETE videos_id=$videos_id filename=$filename filesize=$filesize"); return $video->delete(); } catch (Exception $exc) { _error_log("updateFilesize: ERROR " . $exc->getTraceAsString()); return false; } } } if ($video->getFilesize() == $filesize) { //_error_log("updateFilesize: No need to update videos_id=$videos_id filename=$filename filesize=$filesize"); return $filesize; } $video->setFilesize($filesize); TimeLogEnd("Video::updateFilesize {$videos_id}", __LINE__); if ($video->save(false, true)) { _error_log("updateFilesize: videos_id=$videos_id filename=$filename filesize=$filesize"); return $filesize; } else { _error_log("updateFilesize: ERROR videos_id=$videos_id filename=$filename filesize=$filesize"); return false; } } public static function getAllVideosAsync($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true) { global $global, $advancedCustom; $return = array(); $users_id = User::getId(); $get = json_encode(@$_GET); $post = json_encode(@$_POST); $md5 = md5("{$users_id}{$get}{$post}{$status}{$showOnlyLoggedUserVideos}{$ignoreGroup}" . implode("_", $videosArrayId) . "{$getStatistcs}{$showUnlisted}{$activeUsersOnly}"); $path = getCacheDir() . "getAllVideosAsync/"; make_path($path); $cacheFileName = "{$path}{$md5}"; if (empty($advancedCustom->AsyncJobs) || !file_exists($cacheFileName) || filesize($cacheFileName) === 0) { if (file_exists($cacheFileName . ".lock")) { return array(); } file_put_contents($cacheFileName . ".lock", 1); $total = static::getAllVideos($status, $showOnlyLoggedUserVideos, $ignoreGroup, $videosArrayId, $getStatistcs, $showUnlisted, $activeUsersOnly); file_put_contents($cacheFileName, json_encode($total)); unlink($cacheFileName . ".lock"); return $total; } $return = _json_decode(file_get_contents($cacheFileName)); if (time() - filemtime($cacheFileName) > cacheExpirationTime()) { // file older than 1 min $command = ("php '{$global['systemRootPath']}objects/getAllVideosAsync.php' '$status' '$showOnlyLoggedUserVideos' '$ignoreGroup' '" . json_encode($videosArrayId) . "' '$getStatistcs' '$showUnlisted' '$activeUsersOnly' '{$get}' '{$post}' '{$cacheFileName}'"); _error_log("getAllVideosAsync: {$command}"); exec($command . " > /dev/null 2>/dev/null &"); } return object_to_array($return); } /** * Same as getAllVideos() method but a lighter query * @global type $global * @global type $config * @param type $showOnlyLoggedUserVideos * @return boolean */ public static function getAllVideosLight($status = "viewable", $showOnlyLoggedUserVideos = false, $showUnlisted = false, $suggestedOnly = false) { global $global, $config; if ($config->currentVersionLowerThen('5')) { return false; } $status = str_replace("'", "", $status); $sql = "SELECT v.* " . " FROM videos as v " . " WHERE 1=1 "; $blockedUsers = self::getBlockedUsersIdsArray(); if (!empty($blockedUsers)) { $sql .= " AND v.users_id NOT IN ('" . implode("','", $blockedUsers) . "') "; } if ($showOnlyLoggedUserVideos === true && !Permissions::canModerateVideos()) { $sql .= " AND v.users_id = '" . User::getId() . "'"; } elseif (!empty($showOnlyLoggedUserVideos)) { $sql .= " AND v.users_id = '{$showOnlyLoggedUserVideos}'"; } if ($status == "viewable") { if (User::isLogged()) { $sql .= " AND (v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "') OR (v.status='u' AND v.users_id ='" . User::getId() . "'))"; } else { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } } elseif ($status == "viewableNotUnlisted") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus(false)) . "')"; } elseif (!empty($status)) { $sql .= " AND v.status = '{$status}'"; } if (!empty($_GET['channelName'])) { $user = User::getChannelOwner($_GET['channelName']); $sql .= " AND v.users_id = '{$user['id']}' "; } $sql .= AVideoPlugin::getVideoWhereClause(); if ($suggestedOnly) { $sql .= " AND v.isSuggested = 1 "; $sql .= " ORDER BY RAND() "; } if (strpos(strtolower($sql), 'limit') === false) { if (empty($global['limitForUnlimitedVideos'])) { $global['limitForUnlimitedVideos'] = empty($global['rowCount']) ? 1000 : $global['rowCount']; } if ($global['limitForUnlimitedVideos'] > 0) { $sql .= " LIMIT {$global['limitForUnlimitedVideos']}"; } } //echo $sql; $res = sqlDAL::readSql($sql); $fullData = sqlDAL::fetchAllAssoc($res); // if there is a search, and there is no data and is inside a channel try again without a channel if (!empty($_GET['search']) && empty($fullData) && !empty($_GET['channelName'])) { $channelName = $_GET['channelName']; unset($_GET['channelName']); $return = self::getAllVideosLight($status, $showOnlyLoggedUserVideos, $showUnlisted, $suggestedOnly); $_GET['channelName'] = $channelName; return $return; } sqlDAL::close($res); $videos = array(); if ($res != false) { foreach ($fullData as $row) { if (empty($row['filesize'])) { $row['filesize'] = Video::updateFilesize($row['id']); } $videos[] = $row; } //$videos = $res->fetch_all(MYSQLI_ASSOC); } else { $videos = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $videos; } public static function getTotalVideos($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $showUnlisted = false, $activeUsersOnly = true, $suggestedOnly = false) { global $global, $config, $advancedCustomUser; if ($config->currentVersionLowerThen('5')) { return false; } if (!empty($_POST['sort']['suggested'])) { $suggestedOnly = true; } $status = str_replace("'", "", $status); $cn = ""; if (!empty($_GET['catName'])) { $cn .= ", c.clean_name as cn"; } if (AVideoPlugin::isEnabledByName("VideoTags")) { if (!empty($_GET['tags_id']) && empty($videosArrayId)) { TimeLogStart("video::getAllVideos::getAllVideosIdFromTagsId({$_GET['tags_id']})"); $videosArrayId = VideoTags::getAllVideosIdFromTagsId($_GET['tags_id']); TimeLogEnd("video::getAllVideos::getAllVideosIdFromTagsId({$_GET['tags_id']})", __LINE__); } } $sql = "SELECT v.users_id, v.type, v.id, v.title,v.description, c.name as category {$cn} " . "FROM videos v " . "LEFT JOIN categories c ON categories_id = c.id " . " LEFT JOIN users u ON v.users_id = u.id " . " WHERE 1=1 "; $blockedUsers = self::getBlockedUsersIdsArray(); if (!empty($blockedUsers)) { $sql .= " AND v.users_id NOT IN ('" . implode("','", $blockedUsers) . "') "; } if ($activeUsersOnly) { $sql .= " AND u.status = 'a' "; } $sql .= static::getVideoQueryFileter(); if (!$ignoreGroup) { $sql .= self::getUserGroupsCanSeeSQL('v.'); } if (!empty($videosArrayId) && is_array($videosArrayId)) { $sql .= " AND v.id IN ( '" . implode("', '", $videosArrayId) . "') "; } if ($status == "viewable") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus($showUnlisted)) . "')"; } elseif ($status == "viewableNotUnlisted") { $sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus(false)) . "')"; } elseif (!empty($status)) { $sql .= " AND v.status = '{$status}'"; } if ($showOnlyLoggedUserVideos === true && !Permissions::canModerateVideos()) { $sql .= " AND v.users_id = '" . User::getId() . "'"; } elseif (is_int($showOnlyLoggedUserVideos)) { $sql .= " AND v.users_id = '{$showOnlyLoggedUserVideos}'"; } if (isset($_REQUEST['is_serie'])) { $is_serie = intval($_REQUEST['is_serie']); if (empty($is_serie)) { $sql .= " AND v.serie_playlists_id IS NULL "; } else { $sql .= " AND v.serie_playlists_id IS NOT NULL "; } } if (!empty($_GET['catName'])) { $catName = $global['mysqli']->real_escape_string($_GET['catName']); $sql .= " AND c.clean_name = '{$catName}'"; } if (!empty($_SESSION['type'])) { if ($_SESSION['type'] == 'video') { $sql .= " AND (v.type = 'video' OR v.type = 'embed' OR v.type = 'linkVideo')"; } elseif ($_SESSION['type'] == 'audio') { $sql .= " AND (v.type = 'audio' OR v.type = 'linkAudio')"; } else { $sql .= " AND v.type = '{$_SESSION['type']}' "; } } if (!$ignoreGroup) { $arrayNotIN = AVideoPlugin::getAllVideosExcludeVideosIDArray(); if (!empty($arrayNotIN) && is_array($arrayNotIN)) { $sql .= " AND v.id NOT IN ( '" . implode("', '", $arrayNotIN) . "') "; } } if (!empty($_GET['channelName'])) { $user = User::getChannelOwner($_GET['channelName']); $uid = intval($user['id']); $sql .= " AND v.users_id = '{$uid}' "; } $sql .= AVideoPlugin::getVideoWhereClause(); if (!empty($_POST['searchPhrase'])) { $searchFieldsNames = array('v.title', 'v.description', 'c.name', 'c.description'); if ($advancedCustomUser->videosSearchAlsoSearchesOnChannelName) { $searchFieldsNames[] = 'u.channelName'; } if (AVideoPlugin::isEnabledByName("VideoTags")) { $sql .= " AND ("; $sql .= "v.id IN (select videos_id FROM tags_has_videos LEFT JOIN tags as t ON tags_id = t.id AND t.name LIKE '%{$_POST['searchPhrase']}%' WHERE t.id is NOT NULL)"; $sql .= BootGrid::getSqlSearchFromPost($searchFieldsNames, "OR"); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']); $sql .= ")"; } else { $sql .= ' AND (1=1 ' . BootGrid::getSqlSearchFromPost($searchFieldsNames); $searchFieldsNames = array('v.title'); $sql .= self::getFullTextSearch($searchFieldsNames, $_POST['searchPhrase']) . ')'; } } if ($suggestedOnly) { $sql .= " AND v.isSuggested = 1 "; } $res = sqlDAL::readSql($sql); $numRows = sqlDal::num_rows($res); sqlDAL::close($res); // if there is a search, and there is no data and is inside a channel try again without a channel if (!empty($_GET['search']) && empty($numRows) && !empty($_GET['channelName'])) { $channelName = $_GET['channelName']; unset($_GET['channelName']); $return = self::getTotalVideos($status, $showOnlyLoggedUserVideos, $ignoreGroup, $showUnlisted, $activeUsersOnly, $suggestedOnly); $_GET['channelName'] = $channelName; return $return; } return $numRows; } public static function getTotalVideosInfo($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array()) { $obj = new stdClass(); $obj->likes = 0; $obj->disLikes = 0; $obj->views_count = 0; $obj->total_minutes = 0; $videos = static::getAllVideos($status, $showOnlyLoggedUserVideos, $ignoreGroup, $videosArrayId); foreach ($videos as $value) { $obj->likes += intval($value['likes']); $obj->disLikes += intval($value['dislikes']); $obj->views_count += intval($value['views_count']); $obj->total_minutes += intval(parseDurationToSeconds($value['duration']) / 60); } return $obj; } public static function getTotalVideosInfoAsync($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false) { global $global, $advancedCustom; $path = getCacheDir() . "getTotalVideosInfo/"; make_path($path); $cacheFileName = "{$path}_{$status}_{$showOnlyLoggedUserVideos}_{$ignoreGroup}_" . implode($videosArrayId) . "_{$getStatistcs}"; $return = array(); if (empty($advancedCustom->AsyncJobs) || !file_exists($cacheFileName)) { if (file_exists($cacheFileName . ".lock")) { return array(); } file_put_contents($cacheFileName . ".lock", 1); $total = static::getTotalVideosInfo($status, $showOnlyLoggedUserVideos, $ignoreGroup, $videosArrayId, $getStatistcs); file_put_contents($cacheFileName, json_encode($total)); unlink($cacheFileName . ".lock"); return $total; } $return = _json_decode(file_get_contents($cacheFileName)); if (time() - filemtime($cacheFileName) > cacheExpirationTime()) { // file older than 1 min $command = ("php '{$global['systemRootPath']}objects/getTotalVideosInfoAsync.php' " . " '$status' '$showOnlyLoggedUserVideos' '$ignoreGroup', '" . json_encode($videosArrayId) . "', " . " '$getStatistcs', '$cacheFileName'"); //_error_log("getTotalVideosInfoAsync: {$command}"); exec($command . " > /dev/null 2>/dev/null &"); } return $return; } public static function getViewableStatus($showUnlisted = false) { /** a = active k = active and encoding i = inactive e = encoding x = encoding error d = downloading u = unlisted */ $viewable = array('a', 'k'); if ($showUnlisted) { $viewable[] = "u"; } elseif (!empty($_GET['videoName'])) { $post = $_POST; if (self::isOwnerFromCleanTitle($_GET['videoName']) || Permissions::canModerateVideos()) { $viewable[] = "u"; } $_POST = $post; } return $viewable; } public static function getVideoConversionStatus($filename) { global $global; require_once $global['systemRootPath'] . 'objects/user.php'; if (!User::isLogged()) { die("Only logged users can upload"); } $object = new stdClass(); foreach (self::$types as $value) { $progressFilename = self::getStoragePathFromFileName($filename) . "progress_{$value}.txt"; $content = @url_get_contents($progressFilename); $object->$value = new stdClass(); if (!empty($content)) { $object->$value = self::parseProgress($content); } else { } if (!empty($object->$value->progress) && !is_numeric($object->$value->progress)) { $video = self::getVideoFromFileName($filename); //var_dump($video, $filename); if (!empty($video)) { $object->$value->progress = self::$statusDesc[$video['status']]; } } $object->$value->filename = $progressFilename; } return $object; } private static function parseProgress($content) { //get duration of source $obj = new stdClass(); $obj->duration = 0; $obj->currentTime = 0; $obj->progress = 0; //var_dump($content);exit; preg_match("/Duration: (.*?), start:/", $content, $matches); if (!empty($matches[1])) { $rawDuration = $matches[1]; //rawDuration is in 00:00:00.00 format. This converts it to seconds. $ar = array_reverse(explode(":", $rawDuration)); $duration = floatval($ar[0]); if (!empty($ar[1])) { $duration += intval($ar[1]) * 60; } if (!empty($ar[2])) { $duration += intval($ar[2]) * 60 * 60; } //get the time in the file that is already encoded preg_match_all("/time=(.*?) bitrate/", $content, $matches); $rawTime = array_pop($matches); //this is needed if there is more than one match if (is_array($rawTime)) { $rawTime = array_pop($rawTime); } //rawTime is in 00:00:00.00 format. This converts it to seconds. $ar = array_reverse(explode(":", $rawTime)); $time = floatval($ar[0]); if (!empty($ar[1])) { $time += intval($ar[1]) * 60; } if (!empty($ar[2])) { $time += intval($ar[2]) * 60 * 60; } if (!empty($duration)) { //calculate the progress $progress = round(($time / $duration) * 100); } else { $progress = 'undefined'; } $obj->duration = $duration; $obj->currentTime = $time; $obj->progress = $progress; } return $obj; } public function delete($allowOfflineUser = false) { if (!$allowOfflineUser && !$this->userCanManageVideo()) { return false; } global $global; if (!empty($this->id)) { $this->removeNextVideos($this->id); $this->removeTrailerReference($this->id); $this->removeCampaign($this->id); $video = self::getVideoLight($this->id); $sql = "DELETE FROM videos WHERE id = ?"; } else { return false; } $resp = sqlDAL::writeSql($sql, "i", array($this->id)); if ($resp == false) { _error_log('Error (delete on video) : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); return false; } else { $this->removeVideoFiles(); } return $resp; } public function removeVideoFiles() { $aws_s3 = AVideoPlugin::loadPluginIfEnabled('AWS_S3'); $bb_b2 = AVideoPlugin::loadPluginIfEnabled('Blackblaze_B2'); $ftp = AVideoPlugin::loadPluginIfEnabled('FTP_Storage'); $YPTStorage = AVideoPlugin::loadPluginIfEnabled('YPTStorage'); if (!empty($aws_s3)) { $aws_s3->removeFiles($this->getFilename()); } if (!empty($bb_b2)) { $bb_b2->removeFiles($this->getFilename()); } if (!empty($ftp)) { $ftp->removeFiles($this->getFilename()); } if (!empty($YPTStorage) && !empty($this->getSites_id())) { $YPTStorage->removeFiles($this->getFilename(), $this->getSites_id()); } $this->removeFiles($this->getFilename()); self::deleteThumbs($this->getFilename()); } private function removeNextVideos($videos_id) { if (!$this->userCanManageVideo()) { return false; } global $global; if (!empty($videos_id)) { $sql = "UPDATE videos SET next_videos_id = NULL WHERE next_videos_id = ?"; sqlDAL::writeSql($sql, "s", array($videos_id)); } else { return false; } return true; } private function removeTrailerReference($videos_id) { if (!$this->userCanManageVideo()) { return false; } global $global; if (!empty($videos_id)) { $videoURL = self::getLink($videos_id, '', true); $sql = "UPDATE videos SET trailer1 = '' WHERE trailer1 = ?"; sqlDAL::writeSql($sql, "s", array($videoURL)); $sql = "UPDATE videos SET trailer2 = '' WHERE trailer2 = ?"; sqlDAL::writeSql($sql, "s", array($videoURL)); $sql = "UPDATE videos SET trailer3 = '' WHERE trailer3 = ?"; sqlDAL::writeSql($sql, "s", array($videoURL)); } else { return false; } return true; } private function removeCampaign($videos_id) { if (ObjectYPT::isTableInstalled('vast_campaigns_has_videos')) { if (!empty($this->id)) { $sql = "DELETE FROM vast_campaigns_has_videos "; $sql .= " WHERE videos_id = ?"; $global['lastQuery'] = $sql; return sqlDAL::writeSql($sql, "i", array($videos_id)); } } return false; } private function removeFiles($filename) { if (empty($filename)) { return false; } global $global; $file = self::getStoragePath() . "original_{$filename}"; $this->removeFilePath($file); $files = self::getStoragePath() . "{$filename}"; $this->removeFilePath($files); } private function removeFilePath($filePath) { if (empty($filePath)) { return false; } // Streamlined for less coding space. $files = glob("{$filePath}*"); foreach ($files as $file) { if (file_exists($file)) { if (is_dir($file)) { self::rrmdir($file); } else { @unlink($file); } } } } private static function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { if (is_dir($dir . "/" . $object)) { self::rrmdir($dir . "/" . $object); } else { unlink($dir . "/" . $object); } } } rmdir($dir); } } public function setDescription($description) { global $global, $advancedCustom; if (empty($advancedCustom->disableHTMLDescription)) { $articleObj = AVideoPlugin::getObjectData('Articles'); $configPuri = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($configPuri); if (empty($articleObj->allowAttributes)) { $configPuri->set('HTML.AllowedAttributes', array('a.href', 'a.target', 'a.title', 'a.title', 'img.src', 'img.width', 'img.height')); // remove all attributes except a.href $configPuri->set('Attr.AllowedFrameTargets', array('_blank')); } if (empty($articleObj->allowAttributes)) { $configPuri->set('CSS.AllowedProperties', array()); // remove all CSS } $configPuri->set('AutoFormat.RemoveEmpty', true); // remove empty elements $pure = $purifier->purify($description); $parts = explode("", $pure); if (!empty($parts[1])) { $parts = explode("", $parts[1]); } $new_description = $parts[0]; } else { $new_description = strip_tags(br2nl($description)); } AVideoPlugin::onVideoSetDescription($this->id, $this->description, $new_description); $this->description = $new_description; //var_dump($this->description, $description, $parts);exit; } public function setCategories_id($categories_id) { if (!Category::userCanAddInCategory($categories_id)) { return false; } // to update old cat as well when auto.. if (!empty($this->categories_id)) { $this->old_categories_id = $this->categories_id; } AVideoPlugin::onVideoSetCategories_id($this->id, $this->categories_id, $categories_id); $this->categories_id = $categories_id; } public static function getCleanDuration($duration = "") { if (empty($duration)) { if (!empty($this) && !empty($this->duration)) { $durationParts = explode(".", $this->duration); } else { return "00:00:00"; } } else { $durationParts = explode(".", $duration); } if (empty($durationParts[0])) { return "00:00:00"; } else { $duration = $durationParts[0]; $durationParts = explode(':', $duration); if (count($durationParts) == 1) { return '0:00:' . static::addZero($durationParts[0]); } elseif (count($durationParts) == 2) { return '0:' . static::addZero($durationParts[0]) . ':' . static::addZero($durationParts[1]); } return $duration; } } private static function addZero($str) { if (intval($str) < 10) { return '0' . intval($str); } return $str; } public static function getItemPropDuration($duration = '') { $duration = static::getCleanDuration($duration); $parts = explode(':', $duration); $duration = 'PT' . intval($parts[0]) . 'H' . intval($parts[1]) . 'M' . intval($parts[2]) . 'S'; if ($duration == "PT0H0M0S") { $duration = "PT0H0M1S"; } return $duration; } public static function getItemDurationSeconds($duration = '') { if ($duration == "EE:EE:EE") { return 0; } $duration = static::getCleanDuration($duration); $parts = explode(':', $duration); return intval($parts[0] * 60 * 60) + intval($parts[1] * 60) + intval($parts[2]); } public static function getDurationFromFile($file) { global $global; // get movie duration HOURS:MM:SS.MICROSECONDS if (!file_exists($file)) { _error_log('{"status":"error", "msg":"getDurationFromFile ERROR, File (' . $file . ') Not Found"}'); return "EE:EE:EE"; } // Initialize getID3 engine $getID3 = new getID3; // Analyze file and store returned data in $ThisFileInfo $ThisFileInfo = $getID3->analyze($file); return static::getCleanDuration(@$ThisFileInfo['playtime_string']); } public static function getResolution($file) { global $videogetResolution; if (!isset($videogetResolution)) { $videogetResolution = array(); } if (isset($videogetResolution[$file])) { return $videogetResolution[$file]; } if ( AVideoPlugin::isEnabledByName("Blackblaze_B2") || AVideoPlugin::isEnabledByName("AWS_S3") || AVideoPlugin::isEnabledByName("FTP_Storage") || AVideoPlugin::isEnabledByName("YPTStorage") || !file_exists($file)) { $videogetResolution[$file] = 0; return 0; } global $global; if (preg_match("/.m3u8$/i", $file) && AVideoPlugin::isEnabledByName('VideoHLS') && method_exists(new VideoHLS(), 'getHLSHigestResolutionFromFile')) { $videogetResolution[$file] = VideoHLS::getHLSHigestResolutionFromFile($file); } else { $getID3 = new getID3; $ThisFileInfo = $getID3->analyze($file); $videogetResolution[$file] = intval(@$ThisFileInfo['video']['resolution_y']); } return $videogetResolution[$file]; } public static function getHLSDurationFromFile($file) { $plugin = AVideoPlugin::loadPluginIfEnabled("VideoHLS"); if (empty($plugin)) { return 0; } return VideoHLS::getHLSDurationFromFile($file); } public function updateHLSDurationIfNeed() { $plugin = AVideoPlugin::loadPluginIfEnabled("VideoHLS"); if (empty($plugin)) { return false; } return VideoHLS::updateHLSDurationIfNeed($this); } public function updateDurationIfNeed($fileExtension = ".mp4") { global $global; $source = self::getSourceFile($this->filename, $fileExtension, true); $file = $source['path']; if (!empty($this->id) && $this->duration == "EE:EE:EE" && file_exists($file)) { $this->duration = Video::getDurationFromFile($file); _error_log("Duration Updated: " . json_encode($this)); $sql = "UPDATE videos SET duration = ?, modified = now() WHERE id = ?"; $res = sqlDAL::writeSql($sql, "si", array($this->duration, $this->id)); return $this->id; } else { _error_log("Do not need update duration: "); return false; } } public function getFilename() { return $this->filename; } public function getStatus() { return $this->status; } public function getId() { return $this->id; } public function getVideoDownloadedLink() { return $this->videoDownloadedLink; } public function setVideoDownloadedLink($videoDownloadedLink) { AVideoPlugin::onVideoSetVideoDownloadedLink($this->id, $this->videoDownloadedLink, $videoDownloadedLink); $this->videoDownloadedLink = $videoDownloadedLink; } public static function isLandscape($pathFileName) { global $config; // get movie duration HOURS:MM:SS.MICROSECONDS if (!file_exists($pathFileName)) { echo '{"status":"error", "msg":"isLandscape ERROR, File (' . $pathFileName . ') Not Found"}'; return true; } eval('$cmd="' . $config->getExiftool() . '";'); $resp = true; // is landscape by default exec($cmd . ' 2>&1', $output, $return_val); if ($return_val !== 0) { $resp = true; } else { $w = 1; $h = 0; $rotation = 0; foreach ($output as $value) { preg_match("/Image Size.*:[^0-9]*([0-9]+x[0-9]+)/i", $value, $match); if (!empty($match)) { $parts = explode("x", $match[1]); $w = $parts[0]; $h = $parts[1]; } preg_match("/Rotation.*:[^0-9]*([0-9]+)/i", $value, $match); if (!empty($match)) { $rotation = $match[1]; } } if ($rotation == 0) { if ($w > $h) { $resp = true; } else { $resp = false; } } else { if ($w < $h) { $resp = true; } else { $resp = false; } } } //var_dump($cmd, $w, $h, $rotation, $resp);exit; return $resp; } public function userCanManageVideo() { global $advancedCustomUser; if (Permissions::canAdminVideos()) { return true; } if (empty($this->users_id) || !User::canUpload()) { return false; } // if you not admin you can only manager yours video $users_id = $this->users_id; if ($advancedCustomUser->userCanChangeVideoOwner) { $video = new Video("", "", $this->id); // query again to make sure the user is not changing the owner $users_id = $video->getUsers_id(); } if ($users_id != User::getId()) { return false; } return true; } public function getVideoGroups() { return $this->videoGroups; } public function setVideoGroups($userGroups) { if (is_array($userGroups)) { AVideoPlugin::onVideoSetVideoGroups($this->id, $this->videoGroups, $userGroups); $this->videoGroups = $userGroups; } } /** * * @param type $user_id * text * label Default Primary Success Info Warning Danger */ public static function getTags($video_id, $type = "") { global $advancedCustom, $videos_getTags; if (empty($videos_getTags)) { $videos_getTags = array(); } $name = "{$video_id}_{$type}"; if (!empty($videos_getTags[$name])) { return $videos_getTags[$name]; } if (empty($advancedCustom->AsyncJobs)) { $videos_getTags[$name] = self::getTags_($video_id, $type); return $videos_getTags[$name]; } else { $tags = self::getTagsAsync($video_id, $type); foreach ($tags as $key => $value) { if (is_array($value)) { $tags[$key] = (object) $value; } } $videos_getTags[$name] = $tags; return $tags; } } public static function getTagsHTMLLabelArray($video_id) { global $_getTagsHTMLLabelArray; if (!isset($_getTagsHTMLLabelArray)) { $_getTagsHTMLLabelArray = array(); } if (isset($_getTagsHTMLLabelArray[$video_id])) { return $_getTagsHTMLLabelArray[$video_id]; } $tags = Video::getTags($video_id); $_getTagsHTMLLabelArray[$video_id] = array(); foreach ($tags as $value2) { if (empty($value2->label) || ($value2->label !== __("Paid Content") && $value2->label !== __("Group") && $value2->label !== __("Plugin"))) { continue; } $tooltip = ''; if (!empty($value2->tooltip)) { $icon = $value2->text; if (!empty($value2->tooltipIcon)) { $icon = $value2->tooltipIcon; } $tooltip = ' data-toggle="tooltip" title="' . htmlentities($icon . ' ' . $value2->tooltip) . '" data-html="true"'; } $_getTagsHTMLLabelArray[$video_id][] = '' . $value2->text . ''; } return $_getTagsHTMLLabelArray[$video_id]; } public static function getTags_($video_id, $type = "") { global $advancedCustom, $advancedCustomUser; if (empty($advancedCustom)) { $advancedCustomUser = AVideoPlugin::getObjectData("CustomizeUser"); } if (empty($advancedCustom)) { $advancedCustom = AVideoPlugin::getObjectData("CustomizeAdvanced"); } $currentPage = getCurrentPage(); $rowCount = getRowCount(); $_REQUEST['current'] = 1; $_REQUEST['rowCount'] = 1000; $video = new Video("", "", $video_id); $tags = array(); if (empty($type) || $type === "paid") { $objTag = new stdClass(); $objTag->label = __("Paid Content"); if (!empty($advancedCustom->paidOnlyShowLabels)) { if (!empty($video->getOnly_for_paid())) { $objTag->type = "warning"; $objTag->text = ''; $objTag->tooltip = $advancedCustom->paidOnlyLabel; } else { $objTag->type = "success"; $objTag->text = ''; $objTag->tooltip = $advancedCustom->paidOnlyFreeLabel; } } else { $ppv = AVideoPlugin::getObjectDataIfEnabled("PayPerView"); if ($advancedCustomUser->userCanProtectVideosWithPassword && !empty($video->getVideo_password())) { $objTag->type = "danger"; $objTag->text = ''; $objTag->tooltip = __("Password Protected"); } elseif (!empty($video->getOnly_for_paid())) { $objTag->type = "warning"; $objTag->text = ''; $objTag->tooltip = $advancedCustom->paidOnlyLabel; } elseif ($ppv && PayPerView::isVideoPayPerView($video_id)) { if (!empty($ppv->showPPVLabel)) { $objTag->type = "warning"; $objTag->text = "PPV"; $objTag->tooltip = __("Pay Per View"); } else { $objTag->type = "warning"; $objTag->text = ''; $objTag->tooltip = __("Private"); } } elseif (!Video::isPublic($video_id)) { $objTag->type = "warning"; $objTag->text = ''; $objTag->tooltip = __("Private"); } else { $objTag->type = "success"; $objTag->text = ''; $objTag->tooltip = $advancedCustom->paidOnlyFreeLabel; } } $tags[] = $objTag; $objTag = new stdClass(); } /** a = active i = inactive e = encoding x = encoding error d = downloading u = unlisted */ if (empty($type) || $type === "status") { $objTag = new stdClass(); $objTag->label = __("Status"); $status = $video->getStatus(); $objTag->text = __(Video::$statusDesc[$status]); switch ($status) { case Video::$statusActive: $objTag->type = "success"; break; case Video::$statusActiveAndEncoding: $objTag->type = "success"; break; case Video::$statusInactive: $objTag->type = "warning"; break; case Video::$statusEncoding: $objTag->type = "info"; break; case Video::$statusDownloading: $objTag->type = "info"; break; case Video::$statusUnlisted: $objTag->type = "info"; break; + case Video::$statusRecording: + $objTag->type = "danger isRecording isRecordingIcon"; + break; default: $objTag->type = "danger"; break; } $objTag->text = $objTag->text; $tags[] = $objTag; $objTag = new stdClass(); } if (empty($type) || $type === "userGroups") { $groups = UserGroups::getVideoGroups($video_id); $objTag = new stdClass(); $objTag->label = __("Group"); if (empty($groups)) { $status = $video->getStatus(); if ($status == 'u') { $objTag->type = "info"; $objTag->text = ''; $objTag->tooltip = __("Unlisted"); $tags[] = $objTag; $objTag = new stdClass(); } else { //$objTag->type = "success"; //$objTag->text = __("Public"); } } else { foreach ($groups as $value) { $objTag = new stdClass(); $objTag->label = __("Group"); $objTag->type = "info"; $objTag->text = ''; $objTag->tooltip = $value['group_name']; $tags[] = $objTag; $objTag = new stdClass(); } } } if (empty($type) || $type === "category") { require_once 'category.php'; $sort = null; if (!empty($_POST['sort']['title'])) { $sort = $_POST['sort']; unset($_POST['sort']); } $category = Category::getCategory($video->getCategories_id()); if (!empty($sort)) { $_POST['sort'] = $sort; } $objTag = new stdClass(); $objTag->label = __("Category"); if (!empty($category)) { $objTag->type = "default"; $objTag->text = $category['name']; $tags[] = $objTag; $objTag = new stdClass(); } } if (empty($type) || $type === "source") { $url = $video->getVideoDownloadedLink(); $parse = parse_url($url); $objTag = new stdClass(); $objTag->label = __("Source"); if (!empty($parse['host'])) { $objTag->type = "danger"; $objTag->text = $parse['host']; $tags[] = $objTag; $objTag = new stdClass(); } else { $objTag->type = "info"; $objTag->text = __("Local File"); $tags[] = $objTag; $objTag = new stdClass(); } } $array2 = AVideoPlugin::getVideoTags($video_id); if (is_array($array2)) { $tags = array_merge($tags, $array2); } //var_dump($tags); $_REQUEST['current'] = $currentPage; $_REQUEST['rowCount'] = $rowCount; return $tags; } public static function deleteTagsAsync($video_id) { global $global; if (empty($video_id)) { return false; } $name = "getVideoTags{$video_id}"; ObjectYPT::deleteCache($name); _session_start(); unset($_SESSION['getVideoTags'][$video_id]); $path = getCacheDir() . "getTagsAsync/"; if (!is_dir($path)) { return false; } $cacheFileName = "{$path}_{$video_id}_"; $files = glob("{$cacheFileName}*"); foreach ($files as $file) { unlink($file); } } public static function getTagsAsync($video_id, $type = "video") { global $global, $advancedCustom; $path = getCacheDir() . "getTagsAsync/"; make_path($path); $cacheFileName = "{$path}_{$video_id}_{$type}"; $return = array(); if (!file_exists($cacheFileName)) { if (file_exists($cacheFileName . ".lock")) { return array(); } file_put_contents($cacheFileName . ".lock", 1); $total = static::getTags_($video_id, $type); file_put_contents($cacheFileName, json_encode($total)); unlink($cacheFileName . ".lock"); return $total; } $return = _json_decode(file_get_contents($cacheFileName)); if (time() - filemtime($cacheFileName) > 300) { // file older than 1 min $command = ("php '{$global['systemRootPath']}objects/getTags.php' '$video_id' '$type' '{$cacheFileName}'"); //_error_log("getTags: {$command}"); exec($command . " > /dev/null 2>/dev/null &"); } return (array) $return; } public function getCategories_id() { return $this->categories_id; } public function getType() { return $this->type; } public static function fixCleanTitle($clean_title, $count, $videoId, $original_title = "") { global $global; if (empty($original_title)) { $original_title = $clean_title; } $sql = "SELECT * FROM videos WHERE clean_title = '{$clean_title}' "; if (!empty($videoId)) { $sql .= " AND id != {$videoId} "; } $sql .= " LIMIT 1"; $res = sqlDAL::readSql($sql, "", array(), true); $cleanTitleExists = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($cleanTitleExists != false) { return self::fixCleanTitle($original_title . "-" . $count, $count + 1, $videoId, $original_title); } return $clean_title; } /** * * @global type $global * @param type $videos_id * @param type $users_id if is empty will use the logged user * @return boolean */ public static function isOwner($videos_id, $users_id = 0) { global $global; if (empty($users_id)) { $users_id = User::getId(); if (empty($users_id)) { return false; } } $video_owner = self::getOwner($videos_id); if ($video_owner) { if ($video_owner == $users_id) { return true; } } return false; } public static function isOwnerFromCleanTitle($clean_title, $users_id = 0) { global $global; $video = self::getVideoFromCleanTitle($clean_title); return self::isOwner($video['id'], $users_id); } /** * * @global type $global * @param type $videos_id * @param type $users_id if is empty will use the logged user * @return boolean */ public static function getOwner($videos_id) { global $global; $sql = "SELECT users_id FROM videos WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($videos_id)); $videoRow = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { if ($videoRow != false) { return $videoRow['users_id']; } } else { $videos = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return false; } /** * * @param type $videos_id * @param type $users_id if is empty will use the logged user * @return boolean */ public static function canEdit($videos_id, $users_id = 0) { if (empty($videos_id)) { return false; } if (empty($users_id)) { $users_id = User::getId(); if (empty($users_id)) { return false; } } $user = new User($users_id); if (empty($user)) { return false; } if ($user->getIsAdmin()) { return true; } if (Permissions::canAdminVideos()) { return true; } return self::isOwner($videos_id, $users_id); } public static function getRandom($excludeVideoId = false) { return static::getVideo("", "viewable", false, $excludeVideoId); } public static function getVideoQueryFileter() { global $global; $sql = ""; if (!empty($_GET['playlist_id'])) { require_once $global['systemRootPath'] . 'objects/playlist.php'; $ids = PlayList::getVideosIdFromPlaylist($_GET['playlist_id']); if (!empty($ids)) { $sql .= " AND v.id IN (" . implode(",", $ids) . ") "; } } return $sql; } public function getTitle() { return $this->title; } public function getClean_title() { return $this->clean_title; } public function getDescription() { return $this->description; } public function getExistingVideoFile() { $source = self::getHigestResolutionVideoMP4Source($this->getFilename(), true); if (empty($source)) { _error_log("getExistingVideoFile:: resources are empty " . $this->getFilename()); return false; } $size = filesize($source['path']); if ($size <= 20) {// it is a dummy file $url = $source['url']; _error_log("getExistingVideoFile:: dummy file, download it " . json_encode($source)); $filename = getTmpDir("getExistingVideoFile") . md5($url); copyfile_chunked($url, $filename); wget($url, $filename); return $filename; } return $source['path']; } public function getTrailer1() { return $this->trailer1; } public function getTrailer2() { return $this->trailer2; } public function getTrailer3() { return $this->trailer3; } public function getRate() { return $this->rate; } public function setTrailer1($trailer1) { if (filter_var($trailer1, FILTER_VALIDATE_URL)) { $new_trailer1 = $trailer1; } else { $new_trailer1 = ""; } AVideoPlugin::onVideoSetTrailer1($this->id, $this->trailer1, $new_trailer1); $this->trailer1 = $new_trailer1; } public function setTrailer2($trailer2) { if (filter_var($trailer2, FILTER_VALIDATE_URL)) { $new_trailer2 = $trailer2; } else { $new_trailer2 = ""; } AVideoPlugin::onVideoSetTrailer2($this->id, $this->trailer2, $new_trailer2); $this->trailer2 = $new_trailer2; } public function setTrailer3($trailer3) { if (filter_var($trailer3, FILTER_VALIDATE_URL)) { $new_trailer3 = $trailer3; } else { $new_trailer3 = ""; } AVideoPlugin::onVideoSetTrailer3($this->id, $this->trailer3, $new_trailer3); $this->trailer3 = $new_trailer3; } public function setRate($rate) { AVideoPlugin::onVideoSetRate($this->id, $this->rate, floatval($rate)); $this->rate = floatval($rate); } public function getYoutubeId() { return $this->youtubeId; } public function setYoutubeId($youtubeId) { AVideoPlugin::onVideoSetYoutubeId($this->id, $this->youtubeId, $youtubeId); $this->youtubeId = $youtubeId; } public function setTitle($title) { if ($title === "Video automatically booked" && !empty($this->title)) { return false; } $new_title = strip_tags($title); if (strlen($new_title) > 190) { $new_title = substr($new_title, 0, 187) . '...'; } AVideoPlugin::onVideoSetTitle($this->id, $this->title, $new_title); $this->title = $new_title; } public function setFilename($filename, $force = false) { if ($force || empty($this->filename)) { AVideoPlugin::onVideoSetFilename($this->id, $this->filename, $filename, $force); $this->filename = $filename; } else { _error_log('setFilename: fail ' . $filename . " {$this->id}"); } return $this->filename; } public function getNext_videos_id() { return $this->next_videos_id; } public function setNext_videos_id($next_videos_id) { AVideoPlugin::onVideoSetNext_videos_id($this->id, $this->next_videos_id, $next_videos_id); $this->next_videos_id = $next_videos_id; } public function queue($types = array()) { global $config; if (!User::canUpload()) { return false; } global $global; $obj = new stdClass(); $obj->error = true; $target = $config->getEncoderURL() . "queue"; $postFields = array( 'user' => User::getUserName(), 'pass' => User::getUserPass(), 'fileURI' => $global['webSiteRootURL'] . "videos/original_{$this->getFilename()}", 'filename' => $this->getFilename(), 'videos_id' => $this->getId(), "notifyURL" => "{$global['webSiteRootURL']}" ); if (empty($types) && AVideoPlugin::isEnabledByName("VideoHLS")) { $postFields['inputHLS'] = 1; } elseif (!empty($types)) { foreach ($types as $key => $value) { $postFields[$key] = $value; } } _error_log("SEND To QUEUE: ($target) " . json_encode($postFields)); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $target); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_SAFE_UPLOAD, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); $r = curl_exec($curl); $obj->response = $r; if ($errno = curl_errno($curl)) { $error_message = curl_strerror($errno); //echo "cURL error ({$errno}):\n {$error_message}"; $obj->msg = "cURL error ({$errno}):\n {$error_message}"; } else { $obj->error = false; } _error_log("QUEUE CURL: ($target) " . json_encode($obj)); curl_close($curl); return $obj; } public function getVideoLink() { return $this->videoLink; } public function setVideoLink($videoLink) { AVideoPlugin::onVideoSetVideoLink($this->id, $this->videoLink, $videoLink); $this->videoLink = $videoLink; } public function getCan_download() { return $this->can_download; } public function getCan_share() { return $this->can_share; } public function setCan_download($can_download) { $new_can_download = (empty($can_download) || $can_download === "false") ? 0 : 1; AVideoPlugin::onVideoSetCan_download($this->id, $this->can_download, $new_can_download); $this->can_download = $new_can_download; } public function setCan_share($can_share) { $new_can_share = (empty($can_share) || $can_share === "false") ? 0 : 1; AVideoPlugin::onVideoSetCan_share($this->id, $this->can_share, $new_can_share); $this->can_share = $new_can_share; } public function getOnly_for_paid() { return $this->only_for_paid; } public function setOnly_for_paid($only_for_paid) { $new_only_for_paid = (empty($only_for_paid) || $only_for_paid === "false") ? 0 : 1; AVideoPlugin::onVideoSetOnly_for_paid($this->id, $this->only_for_paid, $new_only_for_paid); $this->only_for_paid = $new_only_for_paid; } /** * * @param type $filename * @param type $type * @return type .jpg .gif .webp _thumbs.jpg _Low.mp4 _SD.mp4 _HD.mp4 */ public static function getSourceFile($filename, $type = ".jpg", $includeS3 = false) { global $global, $advancedCustom, $videosPaths, $VideoGetSourceFile; //if(!isValidFormats($type)){ //return array(); //} self::_moveSourceFilesToDir($filename); $paths = self::getPaths($filename); if ($type == '_thumbsSmallV2.jpg' && empty($advancedCustom->usePreloadLowResolutionImages)) { return array('path' => $global['systemRootPath'] . 'view/img/loading-gif.png', 'url' => getCDN() . 'view/img/loading-gif.png'); } $cacheName = md5($filename . $type . $includeS3); if (0 && isset($VideoGetSourceFile[$cacheName]) && is_array($VideoGetSourceFile[$cacheName])) { if (!preg_match("/token=/", $VideoGetSourceFile[$cacheName]['url'])) { return $VideoGetSourceFile[$cacheName]; } } // check if there is a webp image if ($type === '.gif' && (empty($_SERVER['HTTP_USER_AGENT']) || get_browser_name($_SERVER['HTTP_USER_AGENT']) !== 'Safari')) { $path = "{$paths['path']}{$filename}.webp"; if (file_exists($path)) { $type = ".webp"; } } if (empty($videosPaths[$filename][$type][intval($includeS3)])) { $aws_s3 = AVideoPlugin::loadPluginIfEnabled('AWS_S3'); $bb_b2 = AVideoPlugin::loadPluginIfEnabled('Blackblaze_B2'); $ftp = AVideoPlugin::loadPluginIfEnabled('FTP_Storage'); if (!empty($aws_s3)) { $aws_s3_obj = $aws_s3->getDataObject(); if (!empty($aws_s3_obj->useS3DirectLink)) { $includeS3 = true; } } elseif (!empty($bb_b2)) { $bb_b2_obj = $bb_b2->getDataObject(); if (!empty($bb_b2_obj->useDirectLink)) { $includeS3 = true; } } elseif (!empty($ftp)) { $includeS3 = true; } $token = ""; $secure = AVideoPlugin::loadPluginIfEnabled('SecureVideosDirectory'); if ((preg_match("/.*\\.mp3$/", $type) || preg_match("/.*\\.mp4$/", $type) || preg_match("/.*\\.webm$/", $type) || $type == ".m3u8" || $type == ".pdf" || $type == ".zip")) { $vars = array(); if (!empty($secure)) { $vars[] = $secure->getToken($filename); } if (!empty($vars)) { $token = "?" . implode("&", $vars); } } $paths = self::getPaths($filename); $source = array(); $source['path'] = $paths['path'] . "{$filename}{$type}"; if ($type == ".m3u8") { $source['path'] = self::getStoragePath() . "{$filename}/index{$type}"; } $cleanFileName = self::getCleanFilenameFromFile($filename); $video = Video::getVideoFromFileNameLight($cleanFileName); if (empty($video)) { _error_log("Video::getSourceFile($filename, $type, $includeS3) ERROR video not found ($cleanFileName)"); $VideoGetSourceFile[$cacheName] = false; return false; } $canUseCDN = canUseCDN($video['id']); if (!empty($video['sites_id']) && (preg_match("/.*\\.mp3$/", $type) || preg_match("/.*\\.mp4$/", $type) || preg_match("/.*\\.webm$/", $type) || $type == ".m3u8" || $type == ".pdf" || $type == ".zip") && @filesize($source['path']) < 20) { $site = new Sites($video['sites_id']); $siteURL = getCDNOrURL($site->getUrl(), 'CDN_YPTStorage', $video['sites_id']); $source['url'] = "{$siteURL}{$paths['relative']}{$filename}{$type}{$token}"; if ($type == ".m3u8") { $source['url'] = "{$siteURL}videos/{$filename}/index{$type}{$token}"; } } elseif (!empty($advancedCustom->videosCDN) && $canUseCDN) { $advancedCustom->videosCDN = rtrim($advancedCustom->videosCDN, '/') . '/'; $source['url'] = "{$advancedCustom->videosCDN}{$paths['relative']}{$filename}{$type}{$token}"; if ($type == ".m3u8") { $source['url'] = "{$advancedCustom->videosCDN}videos/{$filename}/index{$type}{$token}"; } } else { $source['url'] = getCDN() . "{$paths['relative']}{$filename}{$type}{$token}"; if ($type == ".m3u8") { $source['url'] = getCDN() . "videos/{$filename}/index{$type}{$token}"; } } /* need it because getDurationFromFile */ if ($includeS3 && ($type == ".mp4" || $type == ".webm" || $type == ".mp3" || $type == ".ogg" || $type == ".pdf" || $type == ".zip")) { if (file_exists($source['path']) && filesize($source['path']) < 1024) { if (!empty($aws_s3)) { $source = $aws_s3->getAddress("{$filename}{$type}"); $source['url'] = replaceCDNIfNeed($source['url'], 'CDN_S3'); } elseif (!empty($bb_b2)) { $source = $bb_b2->getAddress("{$filename}{$type}"); $source['url'] = replaceCDNIfNeed($source['url'], 'CDN_B2'); } elseif (!empty($ftp)) { $source = $ftp->getAddress("{$filename}{$type}"); $source['url'] = replaceCDNIfNeed($source['url'], 'CDN_FTP'); } } } if (!file_exists($source['path']) || ($type !== ".m3u8" && !is_dir($source['path']) && (filesize($source['path']) < 1000 && filesize($source['path']) != 10))) { if ($type != "_thumbsV2.jpg" && $type != "_thumbsSmallV2.jpg" && $type != "_portrait_thumbsV2.jpg" && $type != "_portrait_thumbsSmallV2.jpg") { $VideoGetSourceFile[$cacheName] = array('path' => false, 'url' => false); //if($type=='.jpg'){echo '----'.PHP_EOL;var_dump($type, $source);echo '----'.PHP_EOL;}; //echo PHP_EOL.'---'.PHP_EOL;var_dump($source, $type, !file_exists($source['path']), ($type !== ".m3u8" && !is_dir($source['path']) && (filesize($source['path']) < 1000 && filesize($source['path']) != 10)));echo PHP_EOL.'+++'.PHP_EOL; return $VideoGetSourceFile[$cacheName]; } } $videosPaths[$filename][$type][intval($includeS3)] = $source; } else { $source = $videosPaths[$filename][$type][intval($includeS3)]; } if (substr($type, -4) === ".jpg" || substr($type, -4) === ".png" || substr($type, -4) === ".gif" || substr($type, -4) === ".webp") { $x = uniqid(); if (file_exists($source['path'])) { $x = filemtime($source['path']); } elseif (!empty($video)) { $x = strtotime($video['modified']); } $source['url'] .= "?{$x}"; } //ObjectYPT::setCache($name, $source); $VideoGetSourceFile[$cacheName] = $source; return $VideoGetSourceFile[$cacheName]; } private static function _moveSourceFilesToDir($videoFilename) { $videoFilename = self::getCleanFilenameFromFile($videoFilename); if (preg_match('/^(hd|low|sd|(res[0-9]{3,4}))$/', $videoFilename)) { return false; } $paths = self::getPaths($videoFilename); $lock = "{$paths['path']}.move_v1.lock"; if (file_exists($lock)) { return true; } $videosDir = self::getStoragePath(); mkdir($paths['path'], 0755, true); $files = _glob($videosDir, '/' . $videoFilename . '[._][a-z0-9_]+/i'); //var_dump($paths['path'], is_dir($paths['path']), $files);exit; foreach ($files as $oldname) { if (is_dir($oldname)) { continue; } $newname = str_replace($videosDir, $paths['path'], $oldname); rename($oldname, $newname); } return file_put_contents($lock, time()); } public static function getPaths($videoFilename, $createDir = false) { global $global; $cleanVideoFilename = self::getCleanFilenameFromFile($videoFilename); $videosDir = self::getStoragePath(); if (is_dir("{$videosDir}{$videoFilename}")) { $path = addLastSlash("{$videosDir}{$videoFilename}"); } else if (preg_match('/index\.m3u8$/', $videoFilename)) { $path = addLastSlash($videosDir); } else { $path = addLastSlash("{$videosDir}{$cleanVideoFilename}"); } if ($createDir) { make_path(addLastSlash($path)); } $relative = addLastSlash("videos/{$cleanVideoFilename}"); $url = getCDN() . "{$relative}"; return array('filename' => $cleanVideoFilename, 'path' => $path, 'url' => $url, 'relative' => $relative); } public static function getPathToFile($videoFilename, $createDir = false) { $paths = Video::getPaths($videoFilename, $createDir); return "{$paths['path']}{$videoFilename}"; } public static function getURLToFile($videoFilename, $createDir = false) { $paths = Video::getPaths($videoFilename, $createDir); return "{$paths['url']}{$videoFilename}"; } public static function getURLToFileIfExists($videoFilename) { $paths = Video::getPaths($videoFilename); if (!file_exists("{$paths['path']}{$videoFilename}")) { return false; } return "{$paths['url']}{$videoFilename}"; } public static function getNewVideoFilename($prefix = '', $time = '') { $uid = substr(uniqid(), -4); if (empty($time)) { $time = time(); } $prefix = preg_replace('/[^a-z0-9]/i', '', $prefix); if (empty($prefix)) { $prefix = 'v'; } $date = date('ymdHis', $time); $videoFilename = strtolower("{$prefix}_{$date}_{$uid}"); return self::getPaths($videoFilename); } public static function isNewVideoFilename($filename) { $filename = self::getCleanFilenameFromFile($filename); return preg_match('/_([0-9]{12})_([0-9a-z]{4})$/i', $filename); } public static function getNewVideoFilenameWithPrefixFromFilename($filename) { $video = self::getVideoFromFileNameLight($filename); if (empty($video)) { return self::getNewVideoFilename(); } return self::getNewVideoFilename($video['type']); } public static function updateDirectoryFilename($directory) { if (!is_dir($directory)) { _error_log('Video::updateDirectoryFilename directory not found ' . "[{$directory}]"); return false; } $video = self::getVideoFromFileNameLight($directory); if (empty($video)) { _error_log('Video::updateDirectoryFilename video not found for directory ' . "[{$directory}]"); return false; } if (isAnyStorageEnabled()) { $newFilename = self::getPaths($video['filename']); $id = $video['id']; } else { $newFilename = self::getNewVideoFilename($video['type'], strtotime($video['created'])); $v = new Video('', '', $video['id']); $v->setFilename($newFilename['filename'], true); $id = $v->save(false, true); } if ($id) { $renamed = rename($directory, $newFilename['path']); if (empty($renamed)) { // rename dir fail rollback _error_log('Video::updateDirectoryFilename rename dir fail, we will rollback changes ' . "[olddir={$directory}] [newdir={$newFilename['path']}]"); $v = new Video('', '', $video['id']); $v->setFilename($video['filename'], true); $id = $v->save(false, true); return false; } else { _error_log('Video::updateDirectoryFilename video folder renamed from ' . "[olddir={$directory}] [newdir={$newFilename['path']}]"); self::updateFilesInDirectoryFilename($newFilename['path']); } } return array('videos_id' => $video['id'], 'filename' => $newFilename['filename'], 'oldDir' => $directory, 'newDir' => $newFilename['path']); } public static function updateFilesInDirectoryFilename($directory) { if (!is_dir($directory)) { _error_log('Video::updateFilesInDirectoryFilename directory not found ' . "[{$directory}]"); return false; } $video = self::getVideoFromFileNameLight($directory); if (empty($video)) { _error_log('Video::updateFilesInDirectoryFilename video not found for directory ' . "[{$directory}]"); return false; } $newFilename = $video['filename']; $files = glob("{$directory}*.{jpg,png,gif,webp,vtt,srt,mp4,webm,mp3,ogg,notfound}", GLOB_BRACE); _error_log('Video::updateFilesInDirectoryFilename total files found ' . count($files)); foreach ($files as $value) { $oldFilename = self::getCleanFilenameFromFile($value); $newFilenamePath = str_replace($oldFilename, $newFilename, $value); $renamed = rename($value, $newFilenamePath); if (empty($renamed)) { // rename dir fail rollback _error_log('Video::updateFilesInDirectoryFilename rename file fail ' . "[olddir={$value}] [newdir={$newFilenamePath}]"); } else { _error_log('Video::updateFilesInDirectoryFilename video file renamed from ' . "[olddir={$value}] [newdir={$newFilenamePath}]"); } } } public function getVideoIdHash() { $obj = new stdClass(); $obj->videos_id = $this->id; return encryptString(json_encode($obj)); } public static function getVideoIdFromHash($hash) { $string = decryptString($hash); if (!empty($string)) { $json = json_decode($string); if (!empty($json) && !empty($json->videos_id)) { return $json->videos_id; } } return false; } public static function getCleanFilenameFromFile($filename) { global $global; if (empty($filename)) { return ""; } $filename = fixPath($filename); $filename = str_replace(getVideosDir(), '', $filename); $search = array('_Low', '_SD', '_HD', '_thumbsV2', '_thumbsSmallV2', '_thumbsSprit', '_roku', '_portrait', '_portrait_thumbsV2', '_portrait_thumbsSmallV2', '_spectrum', '_tvg', '.notfound'); if (!empty($global['langs_codes_values_withdot']) && is_array($global['langs_codes_values_withdot'])) { $search = array_merge($search, $global['langs_codes_values_withdot']); } if (empty($global['avideo_resolutions']) || !is_array($global['avideo_resolutions'])) { $global['avideo_resolutions'] = array(240, 360, 480, 540, 720, 1080, 1440, 2160); } foreach ($global['avideo_resolutions'] as $value) { $search[] = "_{$value}"; $search[] = "res{$value}"; } $cleanName = str_replace($search, '', $filename); $path_parts = pathinfo($cleanName); if (empty($path_parts['extension'])) { //_error_log("Video::getCleanFilenameFromFile could not find extension of ".$filename); if (!empty($path_parts['filename'])) { return $path_parts['filename']; } else { return $filename; } } else if (strlen($path_parts['extension']) > 4) { return $cleanName; } else if ($path_parts['filename'] == 'index' && $path_parts['extension'] == 'm3u8') { $parts = explode(DIRECTORY_SEPARATOR, $cleanName); if (!empty($parts[0])) { return $parts[0]; } return $parts[1]; } else { return $path_parts['filename']; } } public static function getSpecificResolution($filename, $desired_resolution) { $filename = self::getCleanFilenameFromFile($filename); $cacheName = "getSpecificResolution($filename)"; $return = ObjectYPT::getCache($cacheName, 0); if (!empty($return)) { return object_to_array($return); } $name0 = "Video:::getSpecificResolution($filename)"; TimeLogStart($name0); $name1 = "Video:::getSpecificResolution::getVideosURL_V2($filename)"; TimeLogStart($name1); $sources = getVideosURL_V2($filename); if (!is_array($sources)) { _error_log("Video:::getSpecificResolution::getVideosURL_V2($filename) does not return an array " . json_encode($sources)); return array(); } TimeLogEnd($name1, __LINE__); $return = array(); foreach ($sources as $key => $value) { if ($value['type'] === 'video') { $parts = explode("_", $key); $resolution = intval(@$parts[1]); if (empty($resolution)) { $name2 = "Video:::getSpecificResolution::getResolution({$value["path"]})"; TimeLogStart($name2); $resolution = self::getResolution($value["path"]); TimeLogEnd($name2, __LINE__); } if (!isset($return['resolution']) || $resolution == $desired_resolution) { $return = $value; $return['resolution'] = $resolution; $return['resolution_text'] = getResolutionText($return['resolution']); $return['resolution_label'] = getResolutionLabel($return['resolution']); $return['resolution_string'] = trim($resolution . "p {$return['resolution_label']}"); } } } TimeLogEnd($name0, __LINE__); ObjectYPT::setCache($cacheName, $return); return $return; } public static function getHigestResolution($filename) { global $global; $filename = self::getCleanFilenameFromFile($filename); $cacheName = "getHigestResolution($filename)"; $return = ObjectYPT::getCache($cacheName, 0); if (!empty($return)) { return object_to_array($return); } $name0 = "Video:::getHigestResolution($filename)"; TimeLogStart($name0); $name1 = "Video:::getHigestResolution::getVideosURL_V2($filename)"; TimeLogStart($name1); $sources = getVideosURL_V2($filename); if (!is_array($sources)) { _error_log("Video:::getHigestResolution::getVideosURL_V2($filename) does not return an array " . json_encode($sources)); return array(); } TimeLogEnd($name1, __LINE__); $return = array(); foreach ($sources as $key => $value) { if ($value['type'] === 'video') { $parts = explode("_", $key); $resolution = intval(@$parts[1]); if (empty($resolution)) { $name2 = "Video:::getHigestResolution::getResolution({$value["path"]})"; TimeLogStart($name2); $resolution = self::getResolutionFromFilename($value["path"]); // this is faster if ($resolution && empty($global['onlyGetResolutionFromFilename'])) { _error_log("Video:::getHigestResolution:: could not get the resolution from file name [{$value["path"]}], trying a slower method"); $resolution = self::getResolution($value["path"]); } TimeLogEnd($name2, __LINE__); } if (!isset($return['resolution']) || $resolution > $return['resolution']) { $return = $value; $return['resolution'] = $resolution; $return['resolution_text'] = getResolutionText($return['resolution']); $return['resolution_label'] = getResolutionLabel($return['resolution']); $return['resolution_string'] = trim($resolution . "p {$return['resolution_label']}"); } } } TimeLogEnd($name0, __LINE__); ObjectYPT::setCache($cacheName, $return); return $return; } public static function getResolutionFromFilename($filename) { $resolution = false; if (preg_match("/_([0-9]+).(mp4|webm)/i", $filename, $matches)) { if (!empty($matches[1])) { $resolution = intval($matches[1]); } } elseif (preg_match('/res([0-9]+)\/index.m3u8/i', $filename, $matches)) { if (!empty($matches[1])) { $resolution = intval($matches[1]); } } //var_dump($filename, $resolution);exit; return $resolution; } public static function getHigestResolutionVideoMP4Source($filename, $includeS3 = false) { global $global; $types = array('', '_HD', '_SD', '_Low'); $resolutions = $global['avideo_resolutions']; rsort($resolutions); foreach ($resolutions as $value) { $types[] = "_{$value}"; } foreach ($types as $value) { $source = self::getSourceFile($filename, $value . ".mp4", $includeS3); if (!empty($source['url'])) { return $source; } } return false; } public static function getHigherVideoPathFromID($videos_id) { global $global; if (empty($videos_id)) { return false; } $paths = self::getVideosPathsFromID($videos_id); $types = array(0, 2160, 1440, 1080, 720, 'HD', 'SD', 'Low', 540, 480, 360, 240); if (!empty($paths['mp4'])) { foreach ($types as $value) { if (!empty($paths['mp4'][$value])) { if (is_string($paths['mp4'][$value])) { return $paths['mp4'][$value]; } else { return $paths['mp4'][$value]["url"]; } } } } if (!empty($paths['webm'])) { foreach ($types as $value) { if (!empty($paths['webm'][$value])) { if (is_string($paths['webm'][$value])) { return $paths['webm'][$value]; } else { return $paths['webm'][$value]["url"]; } } } } if (!empty($paths['m3u8'])) { if (!empty($paths['m3u8'])) { if (is_string($paths['m3u8']["url"])) { return $paths['m3u8']["url"]; } elseif (is_string($paths['m3u8'][$value])) { return $paths['m3u8'][$value]; } else { return $paths['m3u8'][$value]["url"]; } } } if (!empty($paths['mp3'])) { return $paths['mp3']; } return false; } public static function getVideosPathsFromID($videos_id) { if (empty($videos_id)) { return false; } $video = new Video("", "", $videos_id); return self::getVideosPaths($video->getFilename(), true); } public static function getVideosPaths($filename, $includeS3 = false) { global $global; $types = array('', '_Low', '_SD', '_HD'); foreach ($global['avideo_resolutions'] as $value) { $types[] = "_{$value}"; } $videos = array(); $plugin = AVideoPlugin::loadPluginIfEnabled("VideoHLS"); if (!empty($plugin)) { $videos = VideoHLS::getSourceFile($filename, $includeS3); } foreach ($types as $value) { $source = self::getSourceFile($filename, $value . ".mp4", $includeS3); if (!empty($source['url'])) { $videos['mp4'][str_replace("_", "", $value)] = $source['url']; } } foreach ($types as $value) { $source = self::getSourceFile($filename, $value . ".webm", $includeS3); if (!empty($source['url'])) { $videos['webm'][str_replace("_", "", $value)] = $source['url']; } } $source = self::getSourceFile($filename, ".pdf", $includeS3); if (!empty($source['url'])) { $videos['pdf'] = $source['url']; } $source = self::getSourceFile($filename, ".zip", $includeS3); if (!empty($source['url'])) { $videos['zip'] = $source['url']; } $source = self::getSourceFile($filename, ".mp3", $includeS3); if (!empty($source['url'])) { $videos['mp3'] = $source['url']; } return $videos; } public static function getStoragePath() { global $global; $path = "{$global['systemRootPath']}videos" . DIRECTORY_SEPARATOR; return $path; } public static function getStoragePathFromFileName($filename) { $cleanFileName = self::getCleanFilenameFromFile($filename); $path = self::getStoragePath() . "{$cleanFileName}/"; make_path($path); return $path; } public static function getStoragePathFromVideosId($videos_id) { $v = new Video("", "", $videos_id); return self::getStoragePathFromFileName($v->getFilename()); } public static function getImageFromFilename($filename, $type = "video", $async = false) { global $advancedCustom; // I dont know why but I had to remove it to avoid ERR_RESPONSE_HEADERS_TOO_BIG header_remove('Set-Cookie'); if (empty($advancedCustom->AsyncJobs) && !$async) { return self::getImageFromFilename_($filename, $type); } else { return self::getImageFromFilenameAsync($filename, $type); } } public static function getPoster($videos_id) { $images = self::getImageFromID($videos_id); if (!empty($images->poster)) { return $images->poster; } if (!empty($images->posterPortrait)) { return $images->poster; } return false; } public static function getRokuImage($videos_id) { global $global; $images = self::getImageFromID($videos_id); $imagePath = $images->posterLandscapePath; if (empty($imagePath) || !file_exists($imagePath)) { $imagePath = $images->posterLandscapeThumbs; } if (empty($imagePath) || !file_exists($imagePath)) { $imagePath = $images->poster; } $rokuImage = str_replace(".jpg", "_roku.jpg", $imagePath); if (convertImageToRoku($images->posterLandscapePath, $rokuImage)) { return str_replace($global['systemRootPath'], $global['webSiteRootURL'], $rokuImage); } return "" . getCDN() . "view/img/notfound.jpg"; } public static function clearImageCache($filename, $type = "video") { $cacheFileName = "getImageFromFilename_" . $filename . $type . (get_browser_name() == 'Safari' ? "s" : ""); return ObjectYPT::deleteCache($cacheFileName); } public static function getImageFromFilename_($filename, $type = "video") { if (empty($filename)) { return array(); } global $_getImageFromFilename_; if (empty($_getImageFromFilename_)) { $_getImageFromFilename_ = array(); } $cacheFileName = "getImageFromFilename_" . $filename . $type . (get_browser_name() == 'Safari' ? "s" : ""); if (!empty($_getImageFromFilename_[$cacheFileName])) { $obj = $_getImageFromFilename_[$cacheFileName]; } else { $cache = ObjectYPT::getCache($cacheFileName, 0); if (!empty($cache)) { return $cache; } global $global, $advancedCustom; /* $name = "getImageFromFilename_{$filename}{$type}_"; $cached = ObjectYPT::getCache($name, 86400);//one day if(!empty($cached)){ return $cached; } * */ $obj = new stdClass(); $gifSource = self::getSourceFile($filename, ".gif"); $gifPortraitSource = self::getSourceFile($filename, "_portrait.gif"); $jpegSource = self::getSourceFile($filename, ".jpg"); $jpegPortraitSource = self::getSourceFile($filename, "_portrait.jpg"); $jpegPortraitThumbs = self::getSourceFile($filename, "_portrait_thumbsV2.jpg"); $jpegPortraitThumbsSmall = self::getSourceFile($filename, "_portrait_thumbsSmallV2.jpg"); $thumbsSource = self::getSourceFile($filename, "_thumbsV2.jpg"); $thumbsSmallSource = self::getSourceFile($filename, "_thumbsSmallV2.jpg"); $spectrumSource = self::getSourceFile($filename, "_spectrum.jpg"); if (empty($jpegSource)) { return array(); } $obj->poster = $jpegSource['url']; $obj->posterPortrait = $jpegPortraitSource['url']; $obj->posterPortraitPath = $jpegPortraitSource['path']; $obj->posterPortraitThumbs = $jpegPortraitThumbs['url']; $obj->posterPortraitThumbsSmall = $jpegPortraitThumbsSmall['url']; $obj->thumbsGif = $gifSource['url']; $obj->gifPortrait = $gifPortraitSource['url']; $obj->thumbsJpg = $thumbsSource['url']; $obj->thumbsJpgSmall = $thumbsSmallSource['url']; $obj->spectrumSource = $spectrumSource['url']; $obj->posterLandscape = $jpegSource['url']; $obj->posterLandscapePath = $jpegSource['path']; $obj->posterLandscapeThumbs = $thumbsSource['url']; $obj->posterLandscapeThumbsSmall = $thumbsSmallSource['url']; if (file_exists($gifSource['path'])) { $obj->thumbsGif = $gifSource['url']; } if (file_exists($jpegPortraitSource['path'])) { // create thumbs if (!file_exists($jpegPortraitThumbs['path']) && filesize($jpegPortraitSource['path']) > 1024) { _error_log("Resize JPG {$jpegPortraitSource['path']}, {$jpegPortraitThumbs['path']}"); if (!empty($advancedCustom->useFFMPEGToGenerateThumbs)) { im_resizeV3($jpegPortraitSource['path'], $jpegPortraitThumbs['path'], $advancedCustom->thumbsWidthPortrait, $advancedCustom->thumbsHeightPortrait); } else { im_resizeV2($jpegPortraitSource['path'], $jpegPortraitThumbs['path'], $advancedCustom->thumbsWidthPortrait, $advancedCustom->thumbsHeightPortrait); } } // create thumbs if (!file_exists($jpegPortraitThumbsSmall['path']) && filesize($jpegPortraitSource['path']) > 1024) { _error_log("Resize JPG {$jpegPortraitSource['path']}, {$jpegPortraitThumbsSmall['path']}"); if (!empty($advancedCustom->useFFMPEGToGenerateThumbs)) { im_resizeV3($jpegPortraitSource['path'], $jpegPortraitThumbsSmall['path'], $advancedCustom->thumbsWidthPortrait, $advancedCustom->thumbsHeightPortrait); } else { im_resizeV2($jpegPortraitSource['path'], $jpegPortraitThumbsSmall['path'], $advancedCustom->thumbsWidthPortrait, $advancedCustom->thumbsHeightPortrait, 5); } } } else { if ($type == "article") { $obj->posterPortrait = "" . getCDN() . "view/img/article_portrait.png"; $obj->posterPortraitPath = "{$global['systemRootPath']}view/img/article_portrait.png"; $obj->posterPortraitThumbs = "" . getCDN() . "view/img/article_portrait.png"; $obj->posterPortraitThumbsSmall = "" . getCDN() . "view/img/article_portrait.png"; } elseif ($type == "pdf") { $obj->posterPortrait = "" . getCDN() . "view/img/pdf_portrait.png"; $obj->posterPortraitPath = "{$global['systemRootPath']}view/img/pdf_portrait.png"; $obj->posterPortraitThumbs = "" . getCDN() . "view/img/pdf_portrait.png"; $obj->posterPortraitThumbsSmall = "" . getCDN() . "view/img/pdf_portrait.png"; } /* else if ($type == "image") { $obj->posterPortrait = "".getCDN()."view/img/image_portrait.png"; $obj->posterPortraitPath = "{$global['systemRootPath']}view/img/image_portrait.png"; $obj->posterPortraitThumbs = "".getCDN()."view/img/image_portrait.png"; $obj->posterPortraitThumbsSmall = "".getCDN()."view/img/image_portrait.png"; } */ elseif ($type == "zip") { $obj->posterPortrait = "" . getCDN() . "view/img/zip_portrait.png"; $obj->posterPortraitPath = "{$global['systemRootPath']}view/img/zip_portrait.png"; $obj->posterPortraitThumbs = "" . getCDN() . "view/img/zip_portrait.png"; $obj->posterPortraitThumbsSmall = "" . getCDN() . "view/img/zip_portrait.png"; } else { $obj->posterPortrait = "" . getCDN() . "view/img/notfound_portrait.jpg"; $obj->posterPortraitPath = "{$global['systemRootPath']}view/img/notfound_portrait.png"; $obj->posterPortraitThumbs = "" . getCDN() . "view/img/notfound_portrait.jpg"; $obj->posterPortraitThumbsSmall = "" . getCDN() . "view/img/notfound_portrait.jpg"; } } if (file_exists($jpegSource['path'])) { $obj->poster = $jpegSource['url']; $obj->thumbsJpg = $thumbsSource['url']; // create thumbs if (!file_exists($thumbsSource['path']) && filesize($jpegSource['path']) > 1024) { _error_log("Resize JPG {$jpegSource['path']}, {$thumbsSource['path']}"); if (!empty($advancedCustom->useFFMPEGToGenerateThumbs)) { im_resizeV3($jpegSource['path'], $thumbsSource['path'], $advancedCustom->thumbsWidthLandscape, $advancedCustom->thumbsHeightLandscape); } else { im_resizeV2($jpegSource['path'], $thumbsSource['path'], $advancedCustom->thumbsWidthLandscape, $advancedCustom->thumbsHeightLandscape); } } // create thumbs if (!file_exists($thumbsSmallSource['path']) && filesize($jpegSource['path']) > 1024) { _error_log("Resize Small JPG {$jpegSource['path']}, {$thumbsSmallSource['path']}"); if (!empty($advancedCustom->useFFMPEGToGenerateThumbs)) { im_resizeV3($jpegSource['path'], $thumbsSmallSource['path'], $advancedCustom->thumbsWidthLandscape, $advancedCustom->thumbsHeightLandscape); } else { im_resizeV2($jpegSource['path'], $thumbsSmallSource['path'], $advancedCustom->thumbsWidthLandscape, $advancedCustom->thumbsHeightLandscape, 5); } } } else { if ($type == "article") { $obj->poster = "" . getCDN() . "view/img/article.png"; $obj->thumbsJpg = "" . getCDN() . "view/img/article.png"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/article.png"; } elseif ($type == "pdf") { $obj->poster = "" . getCDN() . "view/img/pdf.png"; $obj->thumbsJpg = "" . getCDN() . "view/img/pdf.png"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/pdf.png"; } elseif ($type == "image") { $obj->poster = "" . getCDN() . "view/img/image.png"; $obj->thumbsJpg = "" . getCDN() . "view/img/image.png"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/image.png"; } elseif ($type == "zip") { $obj->poster = "" . getCDN() . "view/img/zip.png"; $obj->thumbsJpg = "" . getCDN() . "view/img/zip.png"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/zip.png"; } elseif (($type !== "audio") && ($type !== "linkAudio")) { if (file_exists($spectrumSource['path'])) { $obj->poster = $spectrumSource['url']; $obj->thumbsJpg = $spectrumSource['url']; $obj->thumbsJpgSmall = $spectrumSource['url']; } else { $obj->poster = "" . getCDN() . "view/img/notfound.jpg"; $obj->thumbsJpg = "" . getCDN() . "view/img/notfoundThumbs.jpg"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/notfoundThumbsSmall.jpg"; } } else { $obj->poster = "" . getCDN() . "view/img/audio_wave.jpg"; $obj->thumbsJpg = "" . getCDN() . "view/img/audio_waveThumbs.jpg"; $obj->thumbsJpgSmall = "" . getCDN() . "view/img/audio_waveThumbsSmall.jpg"; } } if (empty($obj->thumbsJpg)) { $obj->thumbsJpg = $obj->poster; } if (empty($obj->thumbsJpgSmall)) { $obj->thumbsJpgSmall = $obj->poster; } //ObjectYPT::setCache($name, $obj); if (!empty($advancedCustom->disableAnimatedGif)) { $obj->thumbsGif = false; } ObjectYPT::setCache($cacheFileName, $obj); $_getImageFromFilename_[$cacheFileName] = $obj; } return $obj; } public static function getImageFromFilenameAsync($filename, $type = "video") { global $global, $advancedCustom; $return = array(); $path = getCacheDir() . "getImageFromFilenameAsync/"; make_path($path); $cacheFileName = "{$path}_{$filename}_{$type}"; if (empty($advancedCustom->AsyncJobs) || !file_exists($cacheFileName)) { if (file_exists($cacheFileName . ".lock")) { return array(); } file_put_contents($cacheFileName . ".lock", 1); $total = static::getImageFromFilename_($filename, $type); file_put_contents($cacheFileName, json_encode($total)); unlink($cacheFileName . ".lock"); return $total; } $return = _json_decode(file_get_contents($cacheFileName)); if (time() - filemtime($cacheFileName) > cacheExpirationTime()) { // file older than 1 min $command = ("php '{$global['systemRootPath']}objects/getImageFromFilenameAsync.php' '$filename' '$type' '{$cacheFileName}'"); //_error_log("getImageFromFilenameAsync: {$command}"); exec($command . " > /dev/null 2>/dev/null &"); } return $return; } public static function getImageFromID($videos_id, $type = "video") { $video = new Video("", "", $videos_id); return self::getImageFromFilename($video->getFilename()); } public function getViews_count() { return intval($this->views_count); } public static function get_clean_title($videos_id) { global $global; $sql = "SELECT * FROM videos WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($videos_id)); $videoRow = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res != false) { if ($videoRow != false) { return $videoRow['clean_title']; } } else { $videos = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return false; } public static function get_id_from_clean_title($clean_title) { global $global; $sql = "SELECT * FROM videos WHERE clean_title = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "s", array($clean_title)); $videoRow = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res != false) { if ($videoRow != false) { return $videoRow['id']; } } else { $videos = false; die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return false; } public function getChannelName() { return User::_getChannelName($this->getUsers_id()); } public function getChannelLink() { return User::getChannelLink($this->getUsers_id()); } /** * * @global type $global * @param type $videos_id * @param type $clean_title * @param type $embed * @param type $type URLFriendly or permalink * @return String a web link */ public static function getLinkToVideo($videos_id, $clean_title = "", $embed = false, $type = "URLFriendly", $get = array()) { if (!empty($_GET['evideo'])) { $v = self::decodeEvideo(); if (!empty($v['video']['videoLink'])) { if ($embed) { return parseVideos($v['video']['videoLink']); } else { return $v['video']['videoLink']; } } } global $global, $advancedCustomUser, $advancedCustom; if (empty($videos_id) && !empty($clean_title)) { $videos_id = self::get_id_from_clean_title($clean_title); } $video = new Video("", "", $videos_id); if ($advancedCustomUser->addChannelNameOnLinks) { $get['channelName'] = $video->getChannelName(); } unset($get['v'], $get['videoName'], $get['videoName'], $get['isMediaPlaySite'], $get['parentsOnly']); $get_http = http_build_query($get); if (empty($get_http)) { $get_http = ""; } else { $get_http = "?{$get_http}"; } if ($type == "URLFriendly") { $cat = ""; if (!empty($_GET['catName'])) { $cat = "cat/{$_GET['catName']}/"; } if (empty($clean_title)) { $clean_title = $video->getClean_title(); } $clean_title = urlencode($clean_title); $subDir = "video"; $subEmbedDir = "videoEmbed"; if ($video->getType() == 'article') { $subDir = "article"; $subEmbedDir = "articleEmbed"; } if (!empty($advancedCustom->makeVideosIDHarderToGuess)) { $encryptedVideos_id = '.' . idToHash($videos_id); $videos_id = $encryptedVideos_id; } if ($embed) { if (empty($advancedCustom->useVideoIDOnSEOLinks)) { return "{$global['webSiteRootURL']}{$subEmbedDir}/{$clean_title}{$get_http}"; } else { return "{$global['webSiteRootURL']}{$subEmbedDir}/{$videos_id}/{$clean_title}{$get_http}"; } } else { if (empty($advancedCustom->useVideoIDOnSEOLinks)) { return "{$global['webSiteRootURL']}{$cat}{$subDir}/{$clean_title}{$get_http}"; } else { return "{$global['webSiteRootURL']}{$subDir}/{$videos_id}/{$clean_title}{$get_http}"; } } } else { if (!empty($advancedCustom->makeVideosIDHarderToGuess)) { $encryptedVideos_id = '.' . idToHash($videos_id); $videos_id = $encryptedVideos_id; } if ($embed) { return "{$global['webSiteRootURL']}vEmbed/{$videos_id}{$get_http}"; } else { return "{$global['webSiteRootURL']}v/{$videos_id}{$get_http}"; } } } public static function getPermaLink($videos_id, $embed = false, $get = array()) { return self::getLinkToVideo($videos_id, "", $embed, "permalink", $get); } public static function getURLFriendly($videos_id, $embed = false, $get = array()) { return self::getLinkToVideo($videos_id, "", $embed, "URLFriendly", $get); } public static function getPermaLinkFromCleanTitle($clean_title, $embed = false, $get = array()) { return self::getLinkToVideo("", $clean_title, $embed, "permalink", $get); } public static function getURLFriendlyFromCleanTitle($clean_title, $embed = false, $get = array()) { return self::getLinkToVideo("", $clean_title, $embed, "URLFriendly", $get); } public static function getLink($videos_id, $clean_title, $embed = false, $get = array()) { global $advancedCustom; if (!empty($advancedCustom->usePermalinks)) { $type = "permalink"; } else { $type = "URLFriendly"; } return self::getLinkToVideo($videos_id, $clean_title, $embed, $type, $get); } public static function getTotalVideosThumbsUpFromUser($users_id, $startDate, $endDate) { global $global; $sql = "SELECT id from videos WHERE users_id = ? "; $res = sqlDAL::readSql($sql, "i", array($users_id)); $videoRows = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $r = array('thumbsUp' => 0, 'thumbsDown' => 0); if ($res != false) { foreach ($videoRows as $row) { $values = array($row['id']); $format = "i"; $sql = "SELECT id from likes WHERE videos_id = ? AND `like` = 1 "; if (!empty($startDate)) { $sql .= " AND `created` >= ? "; $format .= "s"; $values[] = $startDate; } if (!empty($endDate)) { $sql .= " AND `created` <= ? "; $format .= "s"; $values[] = $endDate; } $res = sqlDAL::readSql($sql, $format, $values); $countRow = sqlDAL::num_rows($res); sqlDAL::close($res); $r['thumbsUp'] += $countRow; $format = ""; $values = array(); $sql = "SELECT id from likes WHERE videos_id = {$row['id']} AND `like` = -1 "; if (!empty($startDate)) { $sql .= " AND `created` >= ? "; $format .= "s"; $values[] = $startDate; } if (!empty($endDate)) { $sql .= " AND `created` <= ? "; $format .= "s"; $values[] = $endDate; } $res = sqlDAL::readSql($sql, $format, $values); $countRow = sqlDAL::num_rows($res); sqlDAL::close($res); $r['thumbsDown'] += $countRow; } } return $r; } public static function deleteThumbs($filename, $doNotDeleteSprit = false) { if (empty($filename)) { return false; } global $global; $filePath = Video::getPathToFile($filename); // Streamlined for less coding space. $files = glob("{$filePath}*_thumbs*.jpg"); foreach ($files as $file) { if (file_exists($file)) { if ($doNotDeleteSprit && strpos($file, '_thumbsSprit.jpg') !== false) { continue; } @unlink($file); } } ObjectYPT::deleteCache($filename); ObjectYPT::deleteCache($filename . "article"); ObjectYPT::deleteCache($filename . "pdf"); ObjectYPT::deleteCache($filename . "video"); Video::clearImageCache($filename); Video::clearImageCache($filename, "article"); Video::clearImageCache($filename, "pdf"); Video::clearImageCache($filename, "audio"); clearVideosURL($filename); return true; } public static function clearCache($videos_id) { _error_log("Video:clearCache($videos_id)"); $video = new Video("", "", $videos_id); $filename = $video->getFilename(); if (empty($filename)) { _error_log("Video:clearCache filename not found"); return false; } self::deleteThumbs($filename, true); ObjectYPT::deleteCache("otherInfo{$videos_id}"); ObjectYPT::deleteCache($filename); ObjectYPT::deleteCache("getVideosURL_V2$filename"); ObjectYPT::deleteCache($filename . "article"); ObjectYPT::deleteCache($filename . "pdf"); ObjectYPT::deleteCache($filename . "video"); ObjectYPT::deleteCache(md5($filename . ".m3u8")); ObjectYPT::deleteCache(md5($filename . ".mp4")); ObjectYPT::deleteCache(md5($filename . ".m3u81")); ObjectYPT::deleteCache(md5($filename . ".mp41")); ObjectYPT::deleteCache("getSourceFile($filename)1"); ObjectYPT::deleteCache("getSourceFile($filename)0"); Video::clearImageCache($filename); Video::clearImageCache($filename, "article"); Video::clearImageCache($filename, "pdf"); Video::clearImageCache($filename, "audio"); Video::deleteTagsAsync($videos_id); clearVideosURL($filename); AVideoPlugin::deleteVideoTags($videos_id); ObjectYPT::setLastDeleteALLCacheTime(); return true; } public static function clearCacheFromFilename($fileName) { _error_log("Video:clearCacheFromFilename($fileName)"); $video = self::getVideoFromFileNameLight($fileName); if (empty($video['id'])) { return false; } return self::clearCache($video['id']); } public static function getVideoPogress($videos_id, $users_id = 0) { if (empty($users_id)) { if (!User::isLogged()) { return 0; } $users_id = User::getId(); } return VideoStatistic::getLastVideoTimeFromVideo($videos_id, $users_id); } public static function getLastVideoTimePosition($videos_id, $users_id = 0) { return self::getVideoPogress($videos_id, $users_id); } public static function getVideoPogressPercent($videos_id, $users_id = 0) { $lastVideoTime = self::getVideoPogress($videos_id, $users_id); if (empty($lastVideoTime)) { return array('percent' => 0, 'lastVideoTime' => 0); } // start incremental search and save $sql = "SELECT duration FROM `videos` WHERE id = ? LIMIT 1"; $res = sqlDAL::readSql($sql, "i", array($videos_id)); $row = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if (empty($row) || empty($row['duration'])) { return array('percent' => 0, 'lastVideoTime' => 0); } $duration = parseDurationToSeconds($row['duration']); if (empty($duration)) { return array('percent' => 0, 'lastVideoTime' => 0); } if ($lastVideoTime > $duration) { return array('percent' => 100, 'lastVideoTime' => $lastVideoTime); } return array('percent' => ($lastVideoTime / $duration) * 100, 'lastVideoTime' => $lastVideoTime); } public function getRrating() { return $this->rrating; } public function setRrating($rrating) { $rrating = strtolower($rrating); if (!in_array($rrating, self::$rratingOptions)) { $rrating = ''; } AVideoPlugin::onVideoSetRrating($this->id, $this->rrating, $rrating); $this->rrating = $rrating; } public static function getVideoType($filename) { global $_getVideoType; if (!isset($_getVideoType)) { $_getVideoType = array(); } if (isset($_getVideoType[$filename])) { return $_getVideoType[$filename]; } $obj = new stdClass(); $paths = self::getVideosPaths($filename); $obj->mp4 = !empty($paths['mp4']) ? true : false; $obj->webm = !empty($paths['webm']) ? true : false; $obj->m3u8 = !empty($paths['m3u8']) ? true : false; $obj->pdf = !empty($paths['pdf']) ? true : false; $obj->mp3 = !empty($paths['mp3']) ? true : false; $_getVideoType[$filename] = $obj; return $obj; } public static function getVideoTypeLabels($filename) { $obj = self::getVideoType($filename); $labels = ""; if (empty($obj->mp4) && empty($obj->webm) && empty($obj->m3u8) && empty($obj->pdf) && empty($obj->mp3)) { return 'Other'; } if ($obj->mp4) { $labels .= 'MP4'; } if ($obj->webm) { $labels .= 'Webm'; } if ($obj->m3u8) { $labels .= 'HLS'; } if ($obj->pdf) { $labels .= 'PDF'; } if ($obj->mp3) { $labels .= 'MP3'; } return $labels; } /** * Based on Roku Type * @param type $filename * @return string */ public static function getVideoTypeText($filename) { $obj = self::getVideoType($filename); $labels = ""; if (empty($obj->mp4) && empty($obj->webm) && empty($obj->m3u8) && empty($obj->pdf) && empty($obj->mp3)) { return __('Other'); } if ($obj->mp4) { return 'MP4'; } if ($obj->webm) { return 'WEBM'; } if ($obj->m3u8) { return 'HLS'; } if ($obj->pdf) { return 'PDF'; } if ($obj->mp3) { return 'MP3'; } return $labels; } public static function isPublic($videos_id) { // check if the video is not public $rows = UserGroups::getVideoGroups($videos_id); if (empty($rows)) { return true; } return false; } public static function userGroupAndVideoGroupMatch($users_id, $videos_id) { if (empty($videos_id)) { return false; } $ppv = AVideoPlugin::loadPluginIfEnabled("PayPerView"); if ($ppv) { $ppv->userCanWatchVideo($users_id, $videos_id); } // check if the video is not public $rows = UserGroups::getVideoGroups($videos_id); if (empty($rows)) { return true; } if (empty($users_id)) { return false; } $rowsUser = UserGroups::getUserGroups(User::getId()); if (empty($rowsUser)) { return false; } foreach ($rows as $value) { foreach ($rowsUser as $value2) { if ($value['id'] === $value2['id']) { return true; } } } return false; } public function getExternalOptions() { return $this->externalOptions; } public function setExternalOptions($externalOptions) { AVideoPlugin::onVideoSetExternalOptions($this->id, $this->externalOptions, $externalOptions); $this->externalOptions = $externalOptions; } public function setVideoStartSeconds($videoStartSeconds) { $externalOptions = _json_decode($this->getExternalOptions()); AVideoPlugin::onVideoSetVideoStartSeconds($this->id, $this->videoStartSeconds, $videoStartSeconds); $externalOptions->videoStartSeconds = $videoStartSeconds; $this->setExternalOptions(json_encode($externalOptions)); } public function setVideoEmbedWhitelist($embedWhitelist) { $externalOptions = _json_decode($this->getExternalOptions()); $externalOptions->embedWhitelist = $embedWhitelist; $this->setExternalOptions(json_encode($externalOptions)); } public function getVideoEmbedWhitelist() { $externalOptions = _json_decode($this->getExternalOptions()); if (empty($externalOptions->embedWhitelist)) { return ''; } return $externalOptions->embedWhitelist; } static public function getEmbedWhitelist($videos_id) { $v = new Video('', '', $videos_id); return $v->getVideoEmbedWhitelist(); } public function getSerie_playlists_id() { return $this->serie_playlists_id; } public function setSerie_playlists_id($serie_playlists_id) { AVideoPlugin::onVideoSetSerie_playlists_id($this->id, $this->serie_playlists_id, $serie_playlists_id); $this->serie_playlists_id = $serie_playlists_id; } public static function getVideoFromSeriePlayListsId($serie_playlists_id) { global $global, $config; $serie_playlists_id = intval($serie_playlists_id); $sql = "SELECT * FROM videos WHERE serie_playlists_id = '$serie_playlists_id' LIMIT 1"; $res = sqlDAL::readSql($sql, "", array(), true); $video = sqlDAL::fetchAssoc($res); sqlDAL::close($res); return $video; } /** * if will show likes, comments, share, etc * @return boolean */ public static function showYoutubeModeOptions() { global $video; if (!empty($_GET['evideo'])) { $v = self::decodeEvideo(); if (empty($v['video']['views_count'])) { return false; } else { return true; } } if (empty($video) || $video['type'] === 'notfound') { return false; } return true; } public static function decodeEvideo() { $evideo = false; if (!empty($_GET['evideo'])) { $evideo = _json_decode(decryptString($_GET['evideo'])); } $video = array(); if (!empty($evideo)) { $video['id'] = 0; $video['type'] = 'embed'; $video['rotation'] = 0; $video['videoLink'] = $evideo->videoLink; $video['title'] = $evideo->title; $video['clean_title'] = preg_replace('/[!#$&\'()*+,\\/:;=?@[\\] ]+/', '-', trim(strtolower(cleanString($evideo->title)))); if (empty($evideo->description) && !empty($evideo->videos_id)) { $divId = uniqid(); $video['description'] = '
'; } else { $video['description'] = @$evideo->description; } $video['duration'] = @$evideo->duration; $video['creator'] = @$evideo->creator; $video['likes'] = ""; $video['dislikes'] = ""; $video['category'] = "embed"; $video['views_count'] = intval(@$evideo->views_count); } return array('evideo' => $evideo, 'video' => $video); } private static function getBlockedUsersIdsArray($users_id = 0) { if (empty($users_id)) { $users_id = intval(User::getId()); } if (empty($users_id)) { return array(); } if (!User::isLogged()) { return array(); } $report = AVideoPlugin::getDataObjectIfEnabled("ReportVideo"); if (empty($report)) { return array(); } return ReportVideo::getAllReportedUsersIdFromUser($users_id); } public static function getIncludeType($video) { $vType = $video['type']; if ($vType == 'linkVideo') { if (!preg_match('/m3u8/', $video['videoLink'])) { $vType = isHTMLPage($video['videoLink']) ? 'embed' : 'video'; } else { $vType = 'video'; } } elseif ($vType == 'live') { $vType = '../../plugin/Live/view/liveVideo'; } elseif ($vType == 'linkAudio') { $vType = 'audio'; } if (!in_array($vType, Video::$typeOptions)) { $vType = 'video'; } return $vType; } private static function getFullTextSearch($columnsArray, $search, $connection = "OR") { global $global; $search = $global['mysqli']->real_escape_string(xss_esc($search)); if (empty($columnsArray) || empty($search)) { return ""; } $sql = "("; $matches = array(); foreach ($columnsArray as $value) { $matches[] = " (MATCH({$value}) AGAINST ('{$search}' IN NATURAL LANGUAGE MODE)) "; } $sql .= implode(" OR ", $matches); $sql .= ")"; return "{$connection} {$sql}"; } public static function getChangeVideoStatusButton($videos_id) { $video = new Video('', '', $videos_id); $status = $video->getStatus(); $activeBtn = ''; $inactiveBtn = ''; $unlistedBtn = ''; return "{$activeBtn}{$inactiveBtn}{$unlistedBtn}"; } } } // just to convert permalink into clean_title if (!empty($_GET['v']) && empty($_GET['videoName'])) { $_GET['videoName'] = Video::get_clean_title($_GET['v']); } diff --git a/plugin/Live/Objects/LiveTransmitionHistory.php b/plugin/Live/Objects/LiveTransmitionHistory.php index 03dea0a43..3205e77e6 100644 --- a/plugin/Live/Objects/LiveTransmitionHistory.php +++ b/plugin/Live/Objects/LiveTransmitionHistory.php @@ -1,457 +1,455 @@ id; } function getTitle() { return $this->title; } function getDescription() { return $this->description; } function getKey() { return $this->key; } function getCreated() { return $this->created; } function getModified() { return $this->modified; } function getUsers_id() { return $this->users_id; } function setId($id) { $this->id = $id; } function getFinished() { return $this->finished; } function setTitle($title) { global $global; $title = $global['mysqli']->real_escape_string($title); $this->title = $title; } function setDescription($description) { global $global; $description = $global['mysqli']->real_escape_string($description); $this->description = $description; } function setKey($key) { $this->key = $key; } function setCreated($created) { $this->created = $created; } function setModified($modified) { $this->modified = $modified; } function setUsers_id($users_id) { $this->users_id = $users_id; } function getLive_servers_id() { return intval($this->live_servers_id); } function getLive_index() { if(empty($this->key)){ return ''; } $parameters = Live::getLiveParametersFromKey($this->key); return $parameters['live_index']; } function getLive_cleanKey() { if(empty($this->key)){ return ''; } $parameters = Live::getLiveParametersFromKey($this->key); return $parameters['cleanKey']; } static function getApplicationObject($liveTransmitionHistory_id) { global $global; $lth = new LiveTransmitionHistory($liveTransmitionHistory_id); $lt = LiveTransmition::getFromDbByUser($lth->getUsers_id()); $liveUsersEnabled = AVideoPlugin::isEnabledByName("LiveUsers"); $p = AVideoPlugin::loadPlugin("Live"); $obj = new stdClass(); $users_id = $lth->getUsers_id(); $u = new User($users_id); $live_servers_id = $lth->getLive_servers_id(); if(empty($live_servers_id) && !empty($_REQUEST['live_servers_id'])){ $live_servers_id = $_REQUEST['live_servers_id']; } $key = $lth->getKey(); $title = $lth->getTitle(); $photo = $u->getPhotoDB(); $m3u8 = Live::getM3U8File($key); $playlists_id_live = 0; if (preg_match("/.*_([0-9]+)/", $key, $matches)) { if (!empty($matches[1])) { $_REQUEST['playlists_id_live'] = intval($matches[1]); $playlists_id_live = $_REQUEST['playlists_id_live']; $photo = PlayLists::getImage($_REQUEST['playlists_id_live']); $title = PlayLists::getNameOrSerieTitle($_REQUEST['playlists_id_live']); } } $obj->UserPhoto = $u->getPhotoDB(); $obj->isAdaptive = Live::isAdaptive($key); $obj->photo = $photo; $obj->channelName = $u->getChannelName(); $obj->live_index = $lth->getLive_index(); $obj->live_cleanKey = $lth->getLive_cleanKey(); $obj->live_servers_id = $live_servers_id; $obj->href = Live::getLinkToLiveFromUsers_idAndLiveServer($users_id, $live_servers_id, $obj->live_index); $obj->key = $key; $obj->isPrivate = Live::isAPrivateLiveFromLiveKey($obj->key); $obj->link = addQueryStringParameter($obj->href, 'embed', 1); $obj->name = $u->getNameIdentificationBd(); $obj->playlists_id_live = $playlists_id_live; $obj->poster = $p->getLivePosterImage($users_id, $live_servers_id, $playlists_id_live, $lth->getLive_index()); $obj->imgGif = $p->getLivePosterImage($users_id, $live_servers_id, $playlists_id_live, $lth->getLive_index(), 'gif'); $obj->title = $title; $obj->user = $u->getUser(); $obj->categories_id = intval($lt['categories_id']); $obj->className = "live_{$obj->live_servers_id}_{$obj->key}"; $users = false; if ($liveUsersEnabled) { $filename = $global['systemRootPath'] . 'plugin/LiveUsers/Objects/LiveOnlineUsers.php'; if (file_exists($filename)) { require_once $filename; $liveUsers = new LiveOnlineUsers(0); $users = $liveUsers->getUsersFromTransmitionKey($key, $live_servers_id); } } $obj->users = $users; $obj->m3u8 =$m3u8; $obj->isURL200 = isURL200($m3u8); $obj->users_id = $users_id; return $obj; } static function getStatsAndAddApplication($liveTransmitionHistory_id) { $stats = getStatsNotifications(); $lth = new LiveTransmitionHistory($liveTransmitionHistory_id); $key = $lth->getKey(); if(!empty($stats['applications'])){ foreach ($stats['applications'] as $value) { if(empty($value['key'])){ continue; } $value = object_to_array($value); $value['key']= self::getCleankeyName($value['key']); if(!empty($value['key']) && $value['key']==$key){ // application is already in the list return $stats; } } } if(!empty($stats['hidden_applications'])){ foreach ($stats['hidden_applications'] as $value) { if(empty($value['key'])){ continue; } $value = object_to_array($value); $value['key']= self::getCleankeyName($value['key']); if($value['key']==$key){ // application is already in the list return $stats; } } } $application = self::getApplicationObject($liveTransmitionHistory_id); if ($application->isPrivate) { $stats['hidden_applications'][] = $application; } else { $stats['applications'][] = $application; } $stats['countLiveStream']++; $cacheName = "getStats" . DIRECTORY_SEPARATOR . "getStatsNotifications"; $cache = ObjectYPT::setCache($cacheName, $stats); // update the cache //_error_log("NGINX getStatsAndAddApplication ". json_encode($stats)); //_error_log("NGINX getStatsAndAddApplication ". json_encode($cache)); return $stats; } static function getCleankeyName($key){ $parts = explode("_", $key); if(!empty($parts[1])){ $adaptive = array('hi', 'low', 'mid'); if(in_array($parts[1], $adaptive)){ return $parts[0]; } } return $key; } static function getStatsAndRemoveApplication($liveTransmitionHistory_id) { $stats = getStatsNotifications(); $lth = new LiveTransmitionHistory($liveTransmitionHistory_id); $key = $lth->getKey(); foreach ($stats['applications'] as $k => $value) { $value = object_to_array($value); if(!empty($value['key']) && $value['key']==$key){ // application is already in the list unset($stats['applications'][$k]); $stats['countLiveStream']--; } } if(empty($stats['hidden_applications'])){ $stats['hidden_applications'] = array(); }else{ foreach ($stats['hidden_applications'] as $k => $value) { $value = object_to_array($value); if($value['key']==$key){ // application is already in the list unset($stats['hidden_applications'][$k]); } } } $cacheName = "getStats" . DIRECTORY_SEPARATOR . "getStatsNotifications"; $cache = ObjectYPT::setCache($cacheName, $stats); // update the cache return $stats; } function setLive_servers_id($live_servers_id) { $this->live_servers_id = intval($live_servers_id); } static function getAllFromUser($users_id) { global $global; $sql = "SELECT * FROM " . static::getTableName() . " WHERE users_id = ? "; $sql .= self::getSqlFromPost(); $res = sqlDAL::readSql($sql, "i", array($users_id)); $fullData = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $rows = array(); if ($res != false) { foreach ($fullData as $row) { $log = LiveTransmitionHistoryLog::getAllFromHistory($row['id']); $row['totalUsers'] = count($log); $rows[] = $row; } } else { die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $rows; } static function getLatest($key, $live_servers_id=null) { global $global; $sql = "SELECT * FROM " . static::getTableName() . " WHERE `key` = ? "; if(isset($live_servers_id)){ $sql .= " AND live_servers_id = ".intval($live_servers_id); } $sql .= " ORDER BY created DESC LIMIT 1"; // I had to add this because the about from customize plugin was not loading on the about page http://127.0.0.1/AVideo/about $res = sqlDAL::readSql($sql, "s", array($key)); $data = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $row = $data; } else { $row = false; } return $row; } static function finish($key) { $row = self::getLatest($key); if(empty($row) || empty($row['id']) || !empty($row['finished'])){ return false; } return self::finishFromTransmitionHistoryId($row['id']); } static function finishFromTransmitionHistoryId($live_transmitions_history_id) { $live_transmitions_history_id = intval($live_transmitions_history_id); if(empty($live_transmitions_history_id)){ return false; } $sql = "UPDATE " . static::getTableName() . " SET finished = now() WHERE id = {$live_transmitions_history_id} "; $insert_row = sqlDAL::writeSql($sql); return $insert_row; } static function getLatestFromUser($users_id) { $rows = self::getLastsLiveHistoriesFromUser($users_id, 1); return @$rows[0]; } static function getLatestFromKey($key) { global $global; $parts = Live::getLiveParametersFromKey($key); $key = $parts['cleanKey']; $sql = "SELECT * FROM " . static::getTableName() . " WHERE `key` LIKE '{$key}%' "; $sql .= " ORDER BY created DESC LIMIT 1"; $res = sqlDAL::readSql($sql); $data = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $row = $data; } else { $row = false; } return $row; } static function getLatestIndexFromKey($key) { global $global; $parts = Live::getLiveParametersFromKey($key); $key = $parts['cleanKey']; $sql = "SELECT * FROM " . static::getTableName() . " WHERE `key` LIKE '{$key}-%' "; $sql .= " ORDER BY created DESC LIMIT 1"; $res = sqlDAL::readSql($sql); $data = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $row = $data; return Live::getLiveIndexFromKey(@$row['key']); } else { return false; } } static function getLastsLiveHistoriesFromUser($users_id, $count=10) { global $global; $sql = "SELECT * FROM " . static::getTableName() . " WHERE `users_id` = ? ORDER BY created DESC LIMIT ?"; $res = sqlDAL::readSql($sql, "ii", array($users_id, $count)); $fullData = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $rows = array(); if ($res != false) { foreach ($fullData as $row) { $log = LiveTransmitionHistoryLog::getAllFromHistory($row['id']); $row['totalUsers'] = count($log); $rows[] = $row; } } else { die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } return $rows; } static function getActiveLiveFromUser($users_id, $live_servers_id='', $key='') { global $global; $sql = "SELECT * FROM " . static::getTableName() . " WHERE finished IS NULL "; $formats = ""; $values = array(); if(!empty($users_id)){ $sql .= ' AND `users_id` = ? '; $formats .= "i"; $values[] = $users_id; } if(!empty($live_servers_id)){ $sql .= ' AND `live_servers_id` = ? '; $formats .= "i"; $values[] = $live_servers_id; } if(!empty($key)){ $sql .= ' AND `key` = ? '; $formats .= "s"; $values[] = $key; } $sql .= " ORDER BY created DESC LIMIT 1"; $res = sqlDAL::readSql($sql, $formats, $values); $data = sqlDAL::fetchAssoc($res); sqlDAL::close($res); if ($res) { $row = $data; } else { $row = false; } if(empty($row)){ _error_log('LiveTransmitionHistory::getActiveLiveFromUser: '.$sql); } return $row; } public function save() { if (empty($this->live_servers_id)) { $this->live_servers_id = 'NULL'; } - AVideoPlugin::onLiveStream($this->users_id, $this->live_servers_id); - return parent::save(); } static function deleteAllFromLiveServer($live_servers_id) { global $global; $live_servers_id = intval($live_servers_id); if (!empty($live_servers_id)) { global $global; $sql = "SELECT id FROM " . static::getTableName() . " WHERE live_servers_id = ? "; $sql .= self::getSqlFromPost(); $res = sqlDAL::readSql($sql, "i", array($live_servers_id)); $fullData = sqlDAL::fetchAllAssoc($res); sqlDAL::close($res); $rows = array(); if ($res != false) { foreach ($fullData as $row) { $lt = new LiveTransmitionHistory($row['id']); $lt->delete(); } } } } public function delete() { if (!empty($this->id)) { LiveTransmitionHistoryLog::deleteAllFromHistory($this->id); } return parent::delete(); } } \ No newline at end of file diff --git a/plugin/Live/index.php b/plugin/Live/index.php index 3bbdc8788..46af154f8 100644 --- a/plugin/Live/index.php +++ b/plugin/Live/index.php @@ -1,314 +1,315 @@ getDataObject(); if (!empty($_GET['c'])) { $user = User::getChannelOwner($_GET['c']); if (!empty($user)) { $_GET['u'] = $user['user']; } } if (!empty($_GET['c'])) { $user = User::getChannelOwner($_GET['c']); if ($user['status'] !== 'a') { header("Location: {$global['webSiteRootURL']}"); } } if (!empty($_GET['u']) && !empty($_GET['embedv2'])) { include $global['systemRootPath'] . 'plugin/Live/view/videoEmbededV2.php'; exit; } else if (!empty($_GET['u']) && !empty($_GET['embed'])) { include $global['systemRootPath'] . 'plugin/Live/view/videoEmbeded.php'; exit; } else if (!empty($_GET['u'])) { include $global['systemRootPath'] . 'plugin/Live/view/modeYoutubeLive.php'; exit; } else if (!User::isLogged()) { gotToLoginAndComeBackHere(""); exit; } else if (!User::canStream()) { forbiddenPage(__($obj->streamDeniedMsg)); } require_once $global['systemRootPath'] . 'objects/userGroups.php'; require_once $global['systemRootPath'] . 'objects/functions.php'; require_once $global['systemRootPath'] . 'plugin/Live/Objects/LiveTransmition.php'; $users_id = User::getId(); if (!empty($_GET['users_id']) && User::isAdmin()) { $users_id = intval($_GET['users_id']); } // if user already have a key $trasnmition = LiveTransmition::createTransmitionIfNeed($users_id); $getLiveKey = array('key' => $trasnmition['key'], 'live_servers_id' => Live::getLiveServersIdRequest()); setLiveKey($trasnmition['key'], Live::getLiveServersIdRequest(), @$_REQUEST['live_index']); if (!empty($_GET['resetKey'])) { LiveTransmition::resetTransmitionKey($users_id); header("Location: {$global['webSiteRootURL']}plugin/Live/"); exit; } $aspectRatio = "16:9"; $vjsClass = "vjs-16-9"; $trans = new LiveTransmition($trasnmition['id']); $groups = $trans->getGroups(); //check if channel name exists $channelName = User::getUserChannelName(); if (empty($channelName)) { $channelName = uniqid(); $user = new User($users_id); $user->setChannelName($channelName); $user->save(); } $col1Class = "col-md-12 col-lg-12"; $col2Class = "hidden"; $chat2 = AVideoPlugin::getObjectDataIfEnabled("Chat2"); if (!empty($chat2) && !empty($chat2->useStaticLayout)) { $col1Class = "col-md-8 col-lg-8"; $col2Class = "col-md-4 col-lg-4"; } ?> <?php echo __("Live") . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?>

getChat($trasnmition['key']); ?> diff --git a/plugin/Live/saveLive.php b/plugin/Live/saveLive.php index b30d3d6b9..be425c60c 100644 --- a/plugin/Live/saveLive.php +++ b/plugin/Live/saveLive.php @@ -1,33 +1,34 @@ error = true; if(!User::canStream()){ $obj->msg = __("Permition denied"); die(json_encode($obj)); } $categories_id = intval(@$_POST['categories_id']); if(empty($categories_id)){ $categories_id = 1; } $l = new LiveTransmition(0); $l->loadByUser(User::getId()); $l->setTitle($_POST['title']); $l->setDescription($_POST['description']); $l->setKey($_POST['key']); $l->setCategories_id($categories_id); $l->setPublic((empty($_POST['listed'])|| $_POST['listed']==='false')?0:1); +$l->setSaveTransmition((empty($_POST['saveTransmition'])|| $_POST['saveTransmition']==='false')?0:1); $l->setUsers_id(User::getId()); $id = $l->save(); $l = new LiveTransmition($id); $l->deleteGroupsTrasmition(); if(!empty($_POST['userGroups'])){ foreach ($_POST['userGroups'] as $value) { $l->insertGroup($value); } } echo '{"status":"'.$id.'"}'; diff --git a/plugin/Live/tabs/tabStreamSettings.php b/plugin/Live/tabs/tabStreamSettings.php index 3e87c92bc..6f6df4798 100644 --- a/plugin/Live/tabs/tabStreamSettings.php +++ b/plugin/Live/tabs/tabStreamSettings.php @@ -1,98 +1,111 @@
onchange="saveStream();"/>
+ +
+ +
+ onchange="saveStream();"/> + +
+
+

/>
diff --git a/plugin/Live/view/live.js b/plugin/Live/view/live.js new file mode 100644 index 000000000..e69de29bb diff --git a/plugin/Live/view/videoEmbeded.php b/plugin/Live/view/videoEmbeded.php index 0b9a9d057..060767e57 100644 --- a/plugin/Live/view/videoEmbeded.php +++ b/plugin/Live/view/videoEmbeded.php @@ -1,124 +1,114 @@ verifyEmbedSecurity(); } $u = new User(0, $_GET['u'], false); $user_id = $u->getBdId(); $video['users_id'] = $user_id; AVideoPlugin::getModeYouTubeLive($user_id); $_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest(); $poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id']); ?> <?php echo $config->getWebSiteTitle(); ?>
- -
- Logo -
-
diff --git a/plugin/Live/view/videoEmbededV2.php b/plugin/Live/view/videoEmbededV2.php index a4a46d649..3379d615a 100644 --- a/plugin/Live/view/videoEmbededV2.php +++ b/plugin/Live/view/videoEmbededV2.php @@ -1,157 +1,147 @@ verifyEmbedSecurity(); } $u = new User(0, $_GET['u'], false); $user_id = $u->getBdId(); $video['users_id'] = $user_id; AVideoPlugin::getModeYouTubeLive($user_id); $_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest(); $poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id']); ?> <?php echo $config->getWebSiteTitle(); ?>
- -
- Logo -
-
getChat($uuid); ?>
diff --git a/plugin/PlayLists/player_old.php b/plugin/PlayLists/player_old.php index 8dea353cb..7a60f64e4 100644 --- a/plugin/PlayLists/player_old.php +++ b/plugin/PlayLists/player_old.php @@ -1,360 +1,349 @@ src = $images->thumbsJpg; $thumbnail = array($src); $playListSources = array(); foreach ($sources as $value2) { if ($value2['type'] !== 'video' && $value2['type'] !== 'audio' && $value2['type'] !== 'serie') { continue; } $playListSources[] = new playListSource($value2['url'], $value['type'] === 'embed'); } if (empty($playListSources)) { continue; } $playListData[] = new PlayListElement($value['title'], $value['description'], $value['duration'], $playListSources, $thumbnail, $images->poster, parseDurationToSeconds(@$externalOptions->videoStartSeconds), $value['cre'], $value['likes'], $value['views_count'], $value['videos_id']); } $video = PlayLists::isPlayListASerie($_GET['playlists_id']); if (!empty($video['id'])) { AVideoPlugin::getEmbed($video['id']); } ?> <?php echo $playListObj->getName() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?> showChannelBannerOnModeYoutube)) { ?>
showAdsenseBannerOnTop)) { ?>
- -
- Logo -
- -
"/>




! videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
diff --git a/plugin/PlayerSkins/PlayerSkins.php b/plugin/PlayerSkins/PlayerSkins.php index 681f6057a..36dac26e9 100644 --- a/plugin/PlayerSkins/PlayerSkins.php +++ b/plugin/PlayerSkins/PlayerSkins.php @@ -1,591 +1,585 @@ The Skis options are: "; $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/skins/'; $names = array(); foreach (glob($dir . '*.css') as $file) { $path_parts = pathinfo($file); $names[] = $path_parts['filename']; } return $desc . "" . implode(" or ", $names) . ""; } public function getName() { return "PlayerSkins"; } public function getUUID() { return "e9a568e6-ef61-4dcc-aad0-0109e9be8e36"; } public function getPluginVersion() { return "1.1"; } public function getEmptyDataObject() { global $global; $obj = new stdClass(); $obj->skin = "avideo"; $obj->playbackRates = "[0.5, 1, 1.5, 2]"; $obj->playerCustomDataSetup = ""; $obj->showSocialShareOnEmbed = true; $obj->showLoopButton = true; $obj->showLogo = false; $obj->showShareSocial = true; $obj->showLogoOnEmbed = false; $obj->showLogoAdjustScale = "0.4"; $obj->showLogoAdjustLeft = "-74px"; $obj->showLogoAdjustTop = "-22px;"; $obj->disableEmbedTopInfo = false; $obj->contextMenuDisableEmbedOnly = false; $obj->contextMenuLoop = true; $obj->contextMenuCopyVideoURL = true; $obj->contextMenuCopyVideoURLCurrentTime = true; $obj->contextMenuCopyEmbedCode = true; $obj->contextMenuShare = true; $obj->playerFullHeight = false; return $obj; } static function getMediaTag($filename, $htmlMediaTag = false) { global $autoPlayURL, $global, $config, $isVideoTypeEmbed; $obj = AVideoPlugin::getObjectData('PlayerSkins'); $html = ''; if (empty($htmlMediaTag)) { $video = Video::getVideoFromFileName($filename, true); $vType = Video::getIncludeType($video); $_GET['isMediaPlaySite'] = $video['id']; if (!empty($video['externalOptions']->videoStartSeconds)) { $video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds); } else { $video['externalOptions']->videoStartSeconds = 0; } $images = Video::getImageFromFilename($filename); if ($vType == 'video') { $htmlMediaTag = ''; } else if ($vType == 'audio') { $htmlMediaTag = ''; } else if ($vType == 'embed') { $disableYoutubeIntegration = false; if (!empty($advancedCustom->disableYoutubePlayerIntegration)) { $disableYoutubeIntegration = true; } $_GET['isEmbedded'] = ""; if (((strpos($video['videoLink'], "youtu.be") == false) && (strpos($video['videoLink'], "youtube.com") == false) && (strpos($video['videoLink'], "vimeo.com") == false)) || ($disableYoutubeIntegration)) { $_GET['isEmbedded'] = "e"; $isVideoTypeEmbed = 1; $url = parseVideos($video['videoLink']); if ($config->getAutoplay()) { $url = addQueryStringParameter($url, 'autoplay', 1); } $htmlMediaTag = ""; $htmlMediaTag .= ''; $htmlMediaTag .= '
'; $htmlMediaTag .= ''; $htmlMediaTag .= ''; $htmlMediaTag .= '
'; } else { // youtube! if ((stripos($video['videoLink'], "youtube.com") != false) || (stripos($video['videoLink'], "youtu.be") != false)) { $_GET['isEmbedded'] = "y"; } else if ((stripos($video['videoLink'], "vimeo.com") != false)) { $_GET['isEmbedded'] = "v"; } $_GET['isMediaPlaySite'] = $video['id']; PlayerSkins::playerJSCodeOnLoad($video['id'], @$video['url']); $htmlMediaTag = ""; $htmlMediaTag .= ''; $htmlMediaTag .= ''; } } else if ($vType == 'serie') { $isVideoTypeEmbed = 1; $link = "{$global['webSiteRootURL']}plugin/PlayLists/embed.php"; $link = addQueryStringParameter($link, 'playlists_id', $video['serie_playlists_id']); $link = addQueryStringParameter($link, 'autoplay', $config->getAutoplay()); $link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']); $htmlMediaTag = ""; $htmlMediaTag .= ''; $htmlMediaTag .= ''; $htmlMediaTag .= ''; } $html .= "'; } $col1Classes = 'col-md-2 firstC'; $col2Classes = 'col-md-8 secC'; $col3Classes = 'col-md-2 thirdC'; if($obj->playerFullHeight){ $col2Classes .= ' text-center playerFullHeight'; } $html .= '
' . $htmlMediaTag . '
'; - if (AVideoPlugin::isEnabledByName('VideoLogoOverlay')) { - $style = VideoLogoOverlay::getStyle(); - $url = VideoLogoOverlay::getLink(); - $html .= ''; - } - $html .= showCloseButton() . '
'; return $html; } public function getHeadCode() { global $global, $config, $video; $obj = $this->getDataObject(); $css = ""; $js = ""; if (isLive()) { $js .= ""; } if (isVideo() || !empty($_GET['videoName']) || !empty($_GET['u']) || !empty($_GET['evideo']) || !empty($_GET['playlists_id'])) { if (self::isAutoplayEnabled()) { $js .= ""; } else { $js .= ""; } $js .= ""; if (!empty($obj->skin)) { $css .= "skin}.css\" rel=\"stylesheet\" type=\"text/css\"/>"; } if ($obj->showLoopButton && !isLive()) { $css .= ""; } $css .= ""; $css .= ""; if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) { $logo = "{$global['webSiteRootURL']}" . $config->getLogo(true); $css .= ""; } if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) { $css .= ""; } } $url = urlencode(getSelfURI()); $oembed = ''; $oembed .= ''; return $js . $css . $oembed; } public function getFooterCode() { global $global, $config, $getStartPlayerJSWasRequested, $video, $url, $title; $js = ""; $obj = $this->getDataObject(); if (!empty($_GET['videoName']) || !empty($_GET['u']) || !empty($_GET['evideo']) || !empty($_GET['playlists_id'])) { if (empty($obj->showLoopButton) && empty($playerSkinsObj->contextMenuLoop)) { $js .= ""; } if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) { $title = $config->getWebSiteTitle(); $url = "{$global['webSiteRootURL']}{$config->getLogo(true)}"; $js .= ""; PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/logo.js")); //$js .= ""; } if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) { $social = getSocialModal(@$video['id'], @$url, @$title); PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/shareButton.js")); //$js .= ""; $js .= $social['html']; $js .= ""; } } if (isAudio()) { $videos_id = getVideos_id(); $video = Video::getVideoLight($videos_id); $spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg"); if (!empty($spectrumSource["path"])) { $onPlayerReady = "startAudioSpectrumProgress('{$spectrumSource["url"]}');"; self::prepareStartPlayerJS($onPlayerReady); } } if (!empty($getStartPlayerJSWasRequested) || isVideo()) { $js .= ""; $js .= ""; } return $js; } static function getDataSetup($str = "") { global $video, $disableYoutubeIntegration, $global; $obj = AVideoPlugin::getObjectData('PlayerSkins'); $dataSetup = array(); $dataSetup[] = "errorDisplay: false"; if (!isLive() && !empty($obj->playbackRates)) { $dataSetup[] = "'playbackRates':{$obj->playbackRates}"; } if (!isLive() && (isset($_GET['isEmbedded'])) && ($disableYoutubeIntegration == false) && !empty($video['videoLink'])) { if ($_GET['isEmbedded'] == "y") { $dataSetup[] = "techOrder:[\"youtube\"]"; $dataSetup[] = "sources:[{type: \"video/youtube\", src: \"{$video['videoLink']}\"}]"; $dataSetup[] = "youtube:{customVars: {wmode: \"transparent\", origin: \"{$global['webSiteRootURL']}\"}}"; } else if ($_GET['isEmbedded'] == "v") { $dataSetup[] = "techOrder:[\"vimeo\"]"; $dataSetup[] = "sources:[{type: \"video/vimeo\", src: \"{$video['videoLink']}\"}]"; $dataSetup[] = "vimeo:{customVars: {wmode: \"transparent\", origin: \"{$global['webSiteRootURL']}\"}}"; } } $pluginsDataSetup = AVideoPlugin::dataSetup(); if (!empty($pluginsDataSetup)) { $dataSetup[] = $pluginsDataSetup; } if (!empty($dataSetup)) { return ",{" . implode(",", $dataSetup) . "{$str}{$obj->playerCustomDataSetup}}"; } return ""; } // this function was modified, maybe removed in the future static function getStartPlayerJS($onPlayerReady = "", $getDataSetup = "", $noReadyFunction = false) { global $prepareStartPlayerJS_onPlayerReady, $prepareStartPlayerJS_getDataSetup; global $getStartPlayerJSWasRequested; self::prepareStartPlayerJS($onPlayerReady, $getDataSetup); //var_dump('getStartPlayerJSWasRequested', debug_backtrace()); $getStartPlayerJSWasRequested = true; //return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '", $onPlayerReady = "' . $onPlayerReady . '", $getDataSetup = "' . $getDataSetup . '" */'; return '/* getStartPlayerJS $prepareStartPlayerJS_onPlayerReady = "' . count($prepareStartPlayerJS_onPlayerReady) . '", $prepareStartPlayerJS_getDataSetup = "' . count($prepareStartPlayerJS_getDataSetup) . '" */'; } static function addOnPlayerReady($onPlayerReady){ return self::getStartPlayerJS($onPlayerReady); } static function getStartPlayerJSCode($noReadyFunction = false, $currentTime = 0) { global $config, $global, $prepareStartPlayerJS_onPlayerReady, $prepareStartPlayerJS_getDataSetup, $IMAADTag; $obj = AVideoPlugin::getObjectData('PlayerSkins'); $js = ""; if (empty($currentTime) && !isLive()) { $currentTime = self::getCurrentTime(); } if(!empty($global['doNotLoadPlayer'])){ return ''; } if(empty($prepareStartPlayerJS_onPlayerReady)){ $prepareStartPlayerJS_onPlayerReady = array(); } if(empty($prepareStartPlayerJS_getDataSetup)){ $prepareStartPlayerJS_getDataSetup = array(); } if (empty($noReadyFunction)) { $js .= "var originalVideo; var adTagOptions; var _adTagUrl = '{$IMAADTag}'; var player; " . "$(document).ready(function () {"; } $js .= " originalVideo = $('#mainVideo').clone(); /* prepareStartPlayerJS_onPlayerReady = " . count($prepareStartPlayerJS_onPlayerReady) . ", prepareStartPlayerJS_getDataSetup = " . count($prepareStartPlayerJS_getDataSetup) . " */ if (typeof player === 'undefined') { player = videojs('mainVideo'" . (self::getDataSetup(implode(" ", $prepareStartPlayerJS_getDataSetup))) . "); "; if (!empty($IMAADTag) && !isLive()) { $js .= "adTagOptions = {id: 'mainVideo', adTagUrl: '{$IMAADTag}', autoPlayAdBreaks:false}; player.ima(adTagOptions);"; $js .= "setInterval(function(){ fixAdSize(); }, 300); // first time it's clicked. var startEvent = 'click';"; if (isMobile()) { $js .= "// Remove controls from the player on iPad to stop native controls from stealing // our click var contentPlayer = document.getElementById('content_video_html5_api'); if (contentPlayer && (navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i)) && contentPlayer.hasAttribute('controls')) { contentPlayer.removeAttribute('controls'); } // Initialize the ad container when the video player is clicked, but only the if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i)) { startEvent = 'touchend'; }"; } $js .= " player.on('adsready', function () { console.log('reloadAds adIsReady '); player.ima.setAdBreakReadyListener(function() {console.log('Ads playAdBreak()');player.ima.playAdBreak();}); });player.on('ads-ad-started', function () { console.log('ads-ad-started'); });player.on('ads-manager', function (a) { console.log('ads-manager', a); });player.on('ads-manager', function (a) { console.log('ads-loader', a); });player.on('ads-manager', function (a) { console.log('ads-request', a); });player.one(startEvent, function () {player.ima.initializeAdDisplayContainer();});"; } $js .= "} player.ready(function () {"; $js .= "var err = this.error(); if (err && err.code) { $('.vjs-error-display').hide(); $('#mainVideo').find('.vjs-poster').css({'background-image': 'url({$global['webSiteRootURL']}plugin/Live/view/Offline.jpg)'}); } " . implode(PHP_EOL, $prepareStartPlayerJS_onPlayerReady) . " playerPlayIfAutoPlay({$currentTime}); }); player.persistvolume({ namespace: 'AVideo' });"; if ($obj->showLoopButton && !isLive()) { $js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/loopbutton.js'); } $js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/fixCurrentSources.js'); if (empty($noReadyFunction)) { $js .= "});"; } //var_dump('getStartPlayerJSWasRequested', debug_backtrace()); $getStartPlayerJSWasRequested = true; return $js; } static private function getCurrentTime() { global $video; $currentTime = 0; if (isset($_GET['t'])) { $currentTime = intval($_GET['t']); } else if (!empty($video['progress']) && !empty($video['progress']['lastVideoTime'])) { $currentTime = intval($video['progress']['lastVideoTime']); $maxCurrentTime = parseDurationToSeconds($video['duration']); if ($maxCurrentTime <= $currentTime + 5) { if (!empty($video['externalOptions']) && !empty($video['externalOptions']->videoStartSeconds)) { $currentTime = intval($video['externalOptions']->videoStartSeconds); } else { $currentTime = 0; } } } else if (!empty($video['externalOptions']) && !empty($video['externalOptions']->videoStartSeconds)) { $currentTime = intval($video['externalOptions']->videoStartSeconds); } return $currentTime; } static function setIMAADTag($tag) { global $IMAADTag; $IMAADTag = $tag; } static function playerJSCodeOnLoad($videos_id, $nextURL = "") { $js = ""; $videos_id = intval($videos_id); if (empty($videos_id)) { return false; } $video = new Video("", "", $videos_id); if (!empty($video) && empty($nextURL)) { if (!empty($video->getNext_videos_id())) { $next_video = Video::getVideo($video->getNext_videos_id()); if (!empty($next_video['id'])) { $nextURL = Video::getURLFriendly($next_video['id'], isEmbed()); } } else { $catName = @$_GET['catName']; $cat = new Category($video->getCategories_id()); $_GET['catName'] = $cat->getClean_name(); $next_video = Video::getVideo('', 'viewable', false, true); $_GET['catName'] = $catName; if (!empty($next_video['id'])) { $nextURL = Video::getURLFriendly($next_video['id'], isEmbed()); } } } $url = Video::getURLFriendly($videos_id); $js .= " player.on('play', function () { addView({$videos_id}, this.currentTime()); }); player.on('timeupdate', function () { var time = Math.round(this.currentTime()); var url = '{$url}'; if (url.indexOf('?') > -1) { url += '&t=' + time; } else { url += '?t=' + time; } $('#linkCurrentTime, .linkCurrentTime').val(url); if (time >= 5 && time % 30 === 0) { addView({$videos_id}, time); } }); player.on('ended', function () { var time = Math.round(this.currentTime()); addView({$videos_id}, time); });"; if (!empty($nextURL)) { $js .= "playNextURL = '{$nextURL}';"; $js .= "player.on('ended', function () {setTimeout(function(){if(playNextURL){playNext(playNextURL);}},playerHasAds()?10000:500);});"; } self::getStartPlayerJS($js); return true; } static private function prepareStartPlayerJS($onPlayerReady = "", $getDataSetup = "") { global $prepareStartPlayerJS_onPlayerReady, $prepareStartPlayerJS_getDataSetup; if (empty($prepareStartPlayerJS_onPlayerReady)) { $prepareStartPlayerJS_onPlayerReady = array(); } if (empty($prepareStartPlayerJS_getDataSetup)) { $prepareStartPlayerJS_getDataSetup = array(); } if (!empty($onPlayerReady)) { $prepareStartPlayerJS_onPlayerReady[] = $onPlayerReady; } if (!empty($getDataSetup)) { $prepareStartPlayerJS_getDataSetup[] = $getDataSetup; } } static function isAutoplayEnabled() { global $config; if (isLive()) { return true; } if (!empty($_COOKIE['autoplay'])) { if (strtolower($_COOKIE['autoplay']) === 'false') { return false; } else { return true; } } return $config->getAutoplay(); } public static function getVideoTags($videos_id) { if (empty($videos_id)) { return array(); } $name = "PlayeSkins_getVideoTags{$videos_id}"; $tags = ObjectYPT::getCache($name, 0); if (empty($tags)) { //_error_log("Cache not found $name"); $video = new Video("", "", $videos_id); $fileName = $video->getFilename(); $resolution = Video::getHigestResolution($fileName); $obj = new stdClass(); if (empty($resolution) || empty($resolution['resolution_text'])) { $obj->label = ''; $obj->type = ""; $obj->text = ""; } else { $obj->label = 'Plugin'; $obj->type = "danger"; $obj->text = $resolution['resolution_text']; $obj->tooltip = $resolution['resolution'] . 'p'; } $tags = $obj; ObjectYPT::setCache($name, $tags); } return array($tags); } } diff --git a/plugin/Scheduler/Objects/Scheduler_commands.php b/plugin/Scheduler/Objects/Scheduler_commands.php new file mode 100644 index 000000000..c8d8200d5 --- /dev/null +++ b/plugin/Scheduler/Objects/Scheduler_commands.php @@ -0,0 +1,129 @@ +errno . ') ' . $global['mysqli']->error); + } + return $rows; + } + + function setId($id) { + $this->id = intval($id); + } + + function setCallbackURL($callbackURL) { + $this->callbackURL = $callbackURL; + } + + function setParameters($parameters) { + $this->parameters = $parameters; + } + + function setDate_to_execute($date_to_execute) { + if(is_numeric($date_to_execute)){ + $date_to_execute = date('Y-m-d H:i:s', $date_to_execute); + } + $this->date_to_execute = $date_to_execute; + } + + function setExecuted_in($executed_in) { + $this->executed_in = $executed_in; + } + + function setStatus($status) { + $this->status = $status; + } + + + function getId() { + return intval($this->id); + } + + function getCallbackURL() { + return $this->callbackURL; + } + + function getParameters() { + return $this->parameters; + } + + function getDate_to_execute() { + return $this->date_to_execute; + } + + function getExecuted_in() { + return $this->executed_in; + } + + function getStatus() { + return $this->status; + } + + function getCallbackResponse() { + return $this->callbackResponse; + } + + function setCallbackResponse($callbackResponse) { + $this->callbackResponse = $callbackResponse; + } + + + function setExecuted($callbackResponse) { + if(!is_string($callbackResponse)){ + $callbackResponse = json_encode($callbackResponse); + } + $this->setExecuted_in(date('Y-m-d H:i:s')); + $this->setCallbackResponse($callbackResponse); + $this->setStatus(self::$statusExecuted); + return $this->save(); + } + + public function save() { + if(empty($this->date_to_execute)){ + _error_log("Scheduler_commands::save(): date_to_execute is empty ". json_encode(debug_backtrace())); + return false; + } + if(empty($this->status)){ + $this->status = self::$statusActive; + } + if(empty($this->callbackURL)){ + $this->callbackURL = ''; + } + return parent::save(); + } + +} diff --git a/plugin/Scheduler/Scheduler.php b/plugin/Scheduler/Scheduler.php new file mode 100644 index 000000000..9a124840a --- /dev/null +++ b/plugin/Scheduler/Scheduler.php @@ -0,0 +1,97 @@ +isReadyLabel(array('YPTWallet')); + return $desc; + } + + public function getName() { + return "Scheduler"; + } + + public function getUUID() { + return "Scheduler-5ee8405eaaa16"; + } + + public function getPluginVersion() { + return "1.0"; + } + + public function updateScript() { + global $global; + /* + if (AVideoPlugin::compareVersion($this->getName(), "2.0") < 0) { + sqlDal::executeFile($global['systemRootPath'] . 'plugin/PayPerView/install/updateV2.0.sql'); + } + * + */ + return true; + } + + public function getEmptyDataObject() { + $obj = new stdClass(); + /* + $obj->textSample = "text"; + $obj->checkboxSample = true; + $obj->numberSample = 5; + + $o = new stdClass(); + $o->type = array(0=>__("Default"))+array(1,2,3); + $o->value = 0; + $obj->selectBoxSample = $o; + + $o = new stdClass(); + $o->type = "textarea"; + $o->value = ""; + $obj->textareaSample = $o; + */ + return $obj; + } + + + public function getPluginMenu() { + global $global; + return ' Edit'; + } + + static public function run($scheduler_commands_id){ + global $_executeSchelude; + if(!isset($_executeSchelude)){ + $_executeSchelude = array(); + } + $e = new Scheduler_commands($scheduler_commands_id); + $callBackURL = $e->getCallbackURL(); + if(!isValidURL($callBackURL)){ + return false; + } + if(empty($_executeSchelude[$callBackURL])){ + $_executeSchelude[$callBackURL] = url_get_contents($callBackURL); + } + if(!empty($_executeSchelude[$callBackURL])){ + return $e->setExecuted($_executeSchelude[$callBackURL]); + } + return false; + } + + + static public function add($date_to_execute, $callbackURL){ + if(empty($date_to_execute)){ + return false; + } + if(empty($callbackURL)){ + return false; + } + $e = new Scheduler_commands(0); + $e->setDate_to_execute($date_to_execute); + $e->setCallbackURL($callbackURL); + return $e->save(); + } + +} diff --git a/plugin/Scheduler/View/Scheduler_commands/add.json.php b/plugin/Scheduler/View/Scheduler_commands/add.json.php new file mode 100644 index 000000000..1b823353c --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/add.json.php @@ -0,0 +1,28 @@ +error = true; +$obj->msg = ""; + +$plugin = AVideoPlugin::loadPluginIfEnabled('Scheduler'); + +if(!User::isAdmin()){ + $obj->msg = "You cant do this"; + die(json_encode($obj)); +} + +$o = new Scheduler_commands(@$_POST['id']); +$o->setCallbackURL($_POST['callbackURL']); +$o->setParameters($_POST['parameters']); +$o->setDate_to_execute($_POST['date_to_execute']); +$o->setExecuted_in($_POST['executed_in']); +$o->setStatus($_POST['status']); + +if($id = $o->save()){ + $obj->error = false; +} + +echo json_encode($obj); diff --git a/plugin/Scheduler/View/Scheduler_commands/delete.json.php b/plugin/Scheduler/View/Scheduler_commands/delete.json.php new file mode 100644 index 000000000..f2f1383a3 --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/delete.json.php @@ -0,0 +1,20 @@ +error = true; + +$plugin = AVideoPlugin::loadPluginIfEnabled('Scheduler'); + +if(!User::isAdmin()){ + $obj->msg = "You cant do this"; + die(json_encode($obj)); +} + +$id = intval($_POST['id']); +$row = new Scheduler_commands($id); +$obj->error = !$row->delete(); +die(json_encode($obj)); +?> \ No newline at end of file diff --git a/plugin/Scheduler/View/Scheduler_commands/index.php b/plugin/Scheduler/View/Scheduler_commands/index.php new file mode 100644 index 000000000..70a97b845 --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/index.php @@ -0,0 +1,29 @@ + + + + + <?php echo $config->getWebSiteTitle(); ?> :: Scheduler + + + + + + + diff --git a/plugin/Scheduler/View/Scheduler_commands/index_body.php b/plugin/Scheduler/View/Scheduler_commands/index_body.php new file mode 100644 index 000000000..a7182f0da --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/index_body.php @@ -0,0 +1,220 @@ + + + +
+
+ +
+
+
+
+
+
+
+
+
+ +
+ + " required="true"> +
+
+ + +
+
+ + " required="true" autocomplete="off"> +
+
+ + " required="true" autocomplete="off"> +
+
+ + +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
#
#
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/plugin/Scheduler/View/Scheduler_commands/index_head.php b/plugin/Scheduler/View/Scheduler_commands/index_head.php new file mode 100644 index 000000000..9a97bce06 --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/index_head.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/plugin/Scheduler/View/Scheduler_commands/list.json.php b/plugin/Scheduler/View/Scheduler_commands/list.json.php new file mode 100644 index 000000000..42ede9d04 --- /dev/null +++ b/plugin/Scheduler/View/Scheduler_commands/list.json.php @@ -0,0 +1,8 @@ + +{"data": } \ No newline at end of file diff --git a/plugin/Scheduler/View/editor.php b/plugin/Scheduler/View/editor.php new file mode 100644 index 000000000..219e176a5 --- /dev/null +++ b/plugin/Scheduler/View/editor.php @@ -0,0 +1,46 @@ + + + + + <?php echo $config->getWebSiteTitle(); ?> :: Scheduler + + + + + + +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ + + + + diff --git a/plugin/Scheduler/install/install.sql b/plugin/Scheduler/install/install.sql new file mode 100644 index 000000000..de23b1d7e --- /dev/null +++ b/plugin/Scheduler/install/install.sql @@ -0,0 +1,12 @@ +CREATE TABLE IF NOT EXISTS `scheduler_commands` ( + `id` INT NOT NULL AUTO_INCREMENT, + `callbackURL` VARCHAR(255) NOT NULL, + `parameters` TEXT NULL, + `created` DATETIME NULL, + `modified` DATETIME NULL, + `date_to_execute` DATETIME NOT NULL, + `executed_in` DATETIME NULL, + `status` CHAR(1) NOT NULL DEFAULT 'a', + `callbackResponse` TEXT NULL, + PRIMARY KEY (`id`)) +ENGINE = InnoDB; \ No newline at end of file diff --git a/plugin/Scheduler/run.php b/plugin/Scheduler/run.php new file mode 100644 index 000000000..19f9eb53b --- /dev/null +++ b/plugin/Scheduler/run.php @@ -0,0 +1,22 @@ +.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;line-height:1.42857143;color:#ffffff;background-color:#222222}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#0ce3ac;text-decoration:none}a:hover,a:focus{color:#0ce3ac;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:2px;line-height:1.42857143;background-color:#222222;border:1px solid #464545;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:21px;margin-bottom:21px;border:0;border-top:1px solid #464545}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999999}h1,.h1,h2,.h2,h3,.h3{margin-top:21px;margin-bottom:10.5px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10.5px;margin-bottom:10.5px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:39px}h2,.h2{font-size:32px}h3,.h3{font-size:26px}h4,.h4{font-size:19px}h5,.h5{font-size:15px}h6,.h6{font-size:13px}p{margin:0 0 10.5px}.lead{margin-bottom:21px;font-size:17px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:22.5px}}small,.small{font-size:86%}mark,.mark{background-color:#f39c12;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#999999}.text-primary{color:#375a7f}a.text-primary:hover,a.text-primary:focus{color:#28415b}.text-success{color:#ffffff}a.text-success:hover,a.text-success:focus{color:#e6e6e6}.text-info{color:#ffffff}a.text-info:hover,a.text-info:focus{color:#e6e6e6}.text-warning{color:#ffffff}a.text-warning:hover,a.text-warning:focus{color:#e6e6e6}.text-danger{color:#ffffff}a.text-danger:hover,a.text-danger:focus{color:#e6e6e6}.bg-primary{color:#fff;background-color:#375a7f}a.bg-primary:hover,a.bg-primary:focus{background-color:#28415b}.bg-success{background-color:#00bc8c}a.bg-success:hover,a.bg-success:focus{background-color:#008966}.bg-info{background-color:#3498db}a.bg-info:hover,a.bg-info:focus{background-color:#217dbb}.bg-warning{background-color:#f39c12}a.bg-warning:hover,a.bg-warning:focus{background-color:#c87f0a}.bg-danger{background-color:#e74c3c}a.bg-danger:hover,a.bg-danger:focus{background-color:#d62c1a}.page-header{padding-bottom:9.5px;margin:42px 0 21px;border-bottom:1px solid transparent}ul,ol{margin-top:0;margin-bottom:10.5px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:21px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10.5px 21px;margin:0 0 21px;font-size:18.75px;border-left:5px solid #464545}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #464545;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:21px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:10px;margin:0 0 10.5px;font-size:14px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#303030;background-color:#ebebeb;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#999999;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:21px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #464545}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #464545}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #464545}.table .table{background-color:#222222}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #464545}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #464545}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#3d3d3d}.table-hover>tbody>tr:hover{background-color:#464545}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#464545}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#393838}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#00bc8c}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#00a379}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#3498db}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#258cd1}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f39c12}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#e08e0b}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#e74c3c}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#e43725}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15.75px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #464545}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:21px;font-size:22.5px;line-height:inherit;color:#ffffff;border:0;border-bottom:1px solid transparent}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:11px;font-size:15px;line-height:1.42857143;color:#464545}.form-control{display:block;width:100%;height:45px;padding:10px 15px;font-size:15px;line-height:1.42857143;color:#464545;background-color:#ffffff;background-image:none;border:1px solid #f1f1f1;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#ffffff;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(255,255,255,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(255,255,255,0.6)}.form-control::-moz-placeholder{color:#999999;opacity:1}.form-control:-ms-input-placeholder{color:#999999}.form-control::-webkit-input-placeholder{color:#999999}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#ebebeb;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:45px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:35px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:66px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:21px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:11px;padding-bottom:11px;margin-bottom:0;min-height:36px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-sm{height:35px;line-height:35px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:35px;line-height:35px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:35px;min-height:34px;padding:7px 9px;font-size:13px;line-height:1.5}.input-lg{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-lg{height:66px;line-height:66px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:66px;line-height:66px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:66px;min-height:40px;padding:19px 27px;font-size:19px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:56.25px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:45px;height:45px;line-height:45px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:66px;height:66px;line-height:66px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:35px;height:35px;line-height:35px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#ffffff}.has-success .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-success .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#00bc8c}.has-success .form-control-feedback{color:#ffffff}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#ffffff}.has-warning .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-warning .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#f39c12}.has-warning .form-control-feedback{color:#ffffff}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#ffffff}.has-error .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-error .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#e74c3c}.has-error .form-control-feedback{color:#ffffff}.has-feedback label~.form-control-feedback{top:26px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#ffffff}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:11px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:32px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:11px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:19px;font-size:19px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:7px;font-size:13px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:10px 15px;font-size:15px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#ffffff;background-color:#464545;border-color:#464545}.btn-default:focus,.btn-default.focus{color:#ffffff;background-color:#2c2c2c;border-color:#060606}.btn-default:hover{color:#ffffff;background-color:#2c2c2c;border-color:#272727}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#2c2c2c;border-color:#272727}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#ffffff;background-color:#1a1a1a;border-color:#060606}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#464545;border-color:#464545}.btn-default .badge{color:#464545;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#375a7f;border-color:#375a7f}.btn-primary:focus,.btn-primary.focus{color:#ffffff;background-color:#28415b;border-color:#101b26}.btn-primary:hover{color:#ffffff;background-color:#28415b;border-color:#253c54}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#28415b;border-color:#253c54}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#1d2f43;border-color:#101b26}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#375a7f;border-color:#375a7f}.btn-primary .badge{color:#375a7f;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#00bc8c;border-color:#00bc8c}.btn-success:focus,.btn-success.focus{color:#ffffff;background-color:#008966;border-color:#003d2d}.btn-success:hover{color:#ffffff;background-color:#008966;border-color:#007f5e}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#008966;border-color:#007f5e}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#ffffff;background-color:#00654b;border-color:#003d2d}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#00bc8c;border-color:#00bc8c}.btn-success .badge{color:#00bc8c;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#3498db;border-color:#3498db}.btn-info:focus,.btn-info.focus{color:#ffffff;background-color:#217dbb;border-color:#16527a}.btn-info:hover{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#217dbb;border-color:#2077b2}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#ffffff;background-color:#1c699d;border-color:#16527a}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#3498db;border-color:#3498db}.btn-info .badge{color:#3498db;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.btn-warning:focus,.btn-warning.focus{color:#ffffff;background-color:#c87f0a;border-color:#7f5006}.btn-warning:hover{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#c87f0a;border-color:#be780a}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#ffffff;background-color:#a66908;border-color:#7f5006}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f39c12;border-color:#f39c12}.btn-warning .badge{color:#f39c12;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.btn-danger:focus,.btn-danger.focus{color:#ffffff;background-color:#d62c1a;border-color:#921e12}.btn-danger:hover{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#d62c1a;border-color:#cd2a19}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#b62516;border-color:#921e12}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#e74c3c;border-color:#e74c3c}.btn-danger .badge{color:#e74c3c;background-color:#ffffff}.btn-link{color:#0ce3ac;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#0ce3ac;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:13px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:15px;text-align:left;background-color:#303030;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#464545}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#ebebeb;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#375a7f}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#375a7f}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:13px;line-height:1.42857143;color:#999999;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:66px;padding:18px 27px;font-size:19px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:66px;line-height:66px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:35px;padding:6px 9px;font-size:13px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:35px;line-height:35px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:10px 15px;font-size:15px;font-weight:normal;line-height:1;color:#464545;text-align:center;background-color:#464545;border:1px solid transparent;border-radius:4px}.input-group-addon.input-sm{padding:6px 9px;font-size:13px;border-radius:3px}.input-group-addon.input-lg{padding:18px 27px;font-size:19px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#303030}.nav>li.disabled>a{color:#605e5e}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#605e5e;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#303030;border-color:#0ce3ac}.nav .nav-divider{height:1px;margin:9.5px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #464545}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#464545 #464545 #464545}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#00bc8c;background-color:#222222;border:1px solid #464545;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ebebeb}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ebebeb;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#222222}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:#375a7f}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ebebeb}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ebebeb;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#222222}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:60px;margin-bottom:21px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:19.5px 15px;font-size:19px;line-height:21px;height:60px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:13px;margin-bottom:13px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:9.75px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:21px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:21px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:19.5px;padding-bottom:19.5px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:7.5px;margin-bottom:7.5px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:7.5px;margin-bottom:7.5px}.navbar-btn.btn-sm{margin-top:12.5px;margin-bottom:12.5px}.navbar-btn.btn-xs{margin-top:19px;margin-bottom:19px}.navbar-text{margin-top:19.5px;margin-bottom:19.5px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#375a7f;border-color:transparent}.navbar-default .navbar-brand{color:#ffffff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#00bc8c;background-color:transparent}.navbar-default .navbar-text{color:#ffffff}.navbar-default .navbar-nav>li>a{color:#ffffff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#00bc8c;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#28415b}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#28415b}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#28415b}.navbar-default .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:transparent}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#28415b;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#00bc8c;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#28415b}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#ffffff}.navbar-default .navbar-link:hover{color:#00bc8c}.navbar-default .btn-link{color:#ffffff}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#00bc8c}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#00bc8c;border-color:transparent}.navbar-inverse .navbar-brand{color:#ffffff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#375a7f;background-color:transparent}.navbar-inverse .navbar-text{color:#ffffff}.navbar-inverse .navbar-nav>li>a{color:#ffffff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#375a7f;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#00a379}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#aaaaaa;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#008966}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#008966}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#009871}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#00a379;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#375a7f;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#00a379}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#aaaaaa;background-color:transparent}}.navbar-inverse .navbar-link{color:#ffffff}.navbar-inverse .navbar-link:hover{color:#375a7f}.navbar-inverse .btn-link{color:#ffffff}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#375a7f}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#aaaaaa}.breadcrumb{padding:8px 15px;margin-bottom:21px;list-style:none;background-color:#464545;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ffffff}.breadcrumb>.active{color:#999999}.pagination{display:inline-block;padding-left:0;margin:21px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:10px 15px;line-height:1.42857143;text-decoration:none;color:#ffffff;background-color:#00bc8c;border:1px solid transparent;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#ffffff;background-color:#00dba3;border-color:transparent}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#ffffff;background-color:#00dba3;border-color:transparent;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#ffffff;background-color:#007053;border-color:transparent;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:18px 27px;font-size:19px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:6px 9px;font-size:13px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:21px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#00bc8c;border:1px solid transparent;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#00dba3}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#dddddd;background-color:#00bc8c;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#464545}.label-default[href]:hover,.label-default[href]:focus{background-color:#2c2c2c}.label-primary{background-color:#375a7f}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#28415b}.label-success{background-color:#00bc8c}.label-success[href]:hover,.label-success[href]:focus{background-color:#008966}.label-info{background-color:#3498db}.label-info[href]:hover,.label-info[href]:focus{background-color:#217dbb}.label-warning{background-color:#f39c12}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c87f0a}.label-danger{background-color:#e74c3c}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#d62c1a}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:13px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#464545;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#375a7f;background-color:#ffffff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#303030}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:23px;font-weight:200}.jumbotron>hr{border-top-color:#161616}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:68px}}.thumbnail{display:block;padding:2px;margin-bottom:21px;line-height:1.42857143;background-color:#222222;border:1px solid #464545;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#0ce3ac}.thumbnail .caption{padding:9px;color:#ffffff}.alert{padding:15px;margin-bottom:21px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#00bc8c;border-color:#00bc8c;color:#ffffff}.alert-success hr{border-top-color:#00a379}.alert-success .alert-link{color:#e6e6e6}.alert-info{background-color:#3498db;border-color:#3498db;color:#ffffff}.alert-info hr{border-top-color:#258cd1}.alert-info .alert-link{color:#e6e6e6}.alert-warning{background-color:#f39c12;border-color:#f39c12;color:#ffffff}.alert-warning hr{border-top-color:#e08e0b}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{background-color:#e74c3c;border-color:#e74c3c;color:#ffffff}.alert-danger hr{border-top-color:#e43725}.alert-danger .alert-link{color:#e6e6e6}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:21px;margin-bottom:21px;background-color:#ebebeb;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:13px;line-height:21px;color:#ffffff;text-align:center;background-color:#375a7f;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#00bc8c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#3498db}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f39c12}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#e74c3c}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#303030;border:1px solid #464545}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#0ce3ac}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#0bcb9a}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{text-decoration:none;color:#0ce3ac;background-color:transparent}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#ebebeb;color:#999999;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#999999}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#375a7f;border-color:#375a7f}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#a8c0da}.list-group-item-success{color:#ffffff;background-color:#00bc8c}a.list-group-item-success,button.list-group-item-success{color:#ffffff}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#ffffff;background-color:#00a379}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-info{color:#ffffff;background-color:#3498db}a.list-group-item-info,button.list-group-item-info{color:#ffffff}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#ffffff;background-color:#258cd1}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-warning{color:#ffffff;background-color:#f39c12}a.list-group-item-warning,button.list-group-item-warning{color:#ffffff}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#ffffff;background-color:#e08e0b}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-danger{color:#ffffff;background-color:#e74c3c}a.list-group-item-danger,button.list-group-item-danger{color:#ffffff}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#ffffff;background-color:#e43725}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:21px;background-color:#303030;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:17px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#464545;border-top:1px solid #464545;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #464545}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:21px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #464545}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #464545}.panel-default{border-color:#464545}.panel-default>.panel-heading{color:#ffffff;background-color:#303030;border-color:#464545}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#464545}.panel-default>.panel-heading .badge{color:#303030;background-color:#ffffff}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#464545}.panel-primary{border-color:#375a7f}.panel-primary>.panel-heading{color:#ffffff;background-color:#375a7f;border-color:#375a7f}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#375a7f}.panel-primary>.panel-heading .badge{color:#375a7f;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#375a7f}.panel-success{border-color:#00bc8c}.panel-success>.panel-heading{color:#ffffff;background-color:#00bc8c;border-color:#00bc8c}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#00bc8c}.panel-success>.panel-heading .badge{color:#00bc8c;background-color:#ffffff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#00bc8c}.panel-info{border-color:#3498db}.panel-info>.panel-heading{color:#ffffff;background-color:#3498db;border-color:#3498db}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#3498db}.panel-info>.panel-heading .badge{color:#3498db;background-color:#ffffff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#3498db}.panel-warning{border-color:#f39c12}.panel-warning>.panel-heading{color:#ffffff;background-color:#f39c12;border-color:#f39c12}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#f39c12}.panel-warning>.panel-heading .badge{color:#f39c12;background-color:#ffffff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#f39c12}.panel-danger{border-color:#e74c3c}.panel-danger>.panel-heading{color:#ffffff;background-color:#e74c3c;border-color:#e74c3c}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#e74c3c}.panel-danger>.panel-heading .badge{color:#e74c3c;background-color:#ffffff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#e74c3c}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#303030;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:22.5px;font-weight:bold;line-height:1;color:#ffffff;text-shadow:none;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#ffffff;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#303030;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.7;filter:alpha(opacity=70)}.modal-header{padding:15px;border-bottom:1px solid #464545}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #464545}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:13px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;background-color:#000000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Lato","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:15px;background-color:#303030;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:15px;background-color:#282828;border-bottom:1px solid #1c1c1c;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#666666;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#303030}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#666666;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#303030}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#666666;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#303030}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#666666;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#303030;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar{border-width:0}.navbar-default .badge{background-color:#fff;color:#375a7f}.navbar-inverse .badge{background-color:#fff;color:#00bc8c}.navbar-brand{line-height:1}.navbar-form .form-control{background-color:white}.navbar-form .form-control:focus{border-color:white}.btn{border-width:2px}.btn:active{-webkit-box-shadow:none;box-shadow:none}.btn-group.open .dropdown-toggle{-webkit-box-shadow:none;box-shadow:none}.text-primary,.text-primary:hover{color:#4673a3}.text-success,.text-success:hover{color:#00bc8c}.text-danger,.text-danger:hover{color:#e74c3c}.text-warning,.text-warning:hover{color:#f39c12}.text-info,.text-info:hover{color:#3498db}table a:not(.btn),.table a:not(.btn){text-decoration:underline}table .dropdown-menu a,.table .dropdown-menu a{text-decoration:none}table .success,.table .success,table .warning,.table .warning,table .danger,.table .danger,table .info,.table .info{color:#fff}table .success>th>a,.table .success>th>a,table .warning>th>a,.table .warning>th>a,table .danger>th>a,.table .danger>th>a,table .info>th>a,.table .info>th>a,table .success>td>a,.table .success>td>a,table .warning>td>a,.table .warning>td>a,table .danger>td>a,.table .danger>td>a,table .info>td>a,.table .info>td>a,table .success>a,.table .success>a,table .warning>a,.table .warning>a,table .danger>a,.table .danger>a,table .info>a,.table .info>a{color:#fff}table>thead>tr>th,.table>thead>tr>th,table>tbody>tr>th,.table>tbody>tr>th,table>tfoot>tr>th,.table>tfoot>tr>th,table>thead>tr>td,.table>thead>tr>td,table>tbody>tr>td,.table>tbody>tr>td,table>tfoot>tr>td,.table>tfoot>tr>td{border:none}table-bordered>thead>tr>th,.table-bordered>thead>tr>th,table-bordered>tbody>tr>th,.table-bordered>tbody>tr>th,table-bordered>tfoot>tr>th,.table-bordered>tfoot>tr>th,table-bordered>thead>tr>td,.table-bordered>thead>tr>td,table-bordered>tbody>tr>td,.table-bordered>tbody>tr>td,table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #464545}input,textarea{color:#464545}.form-control,input,textarea{border:2px hidden transparent;-webkit-box-shadow:none;box-shadow:none}.form-control:focus,input:focus,textarea:focus{-webkit-box-shadow:none;box-shadow:none}.form-control-feedback{color:#464545}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label,.has-warning .form-control-feedback{color:#f39c12}.has-warning .form-control,.has-warning .form-control:focus{-webkit-box-shadow:none;box-shadow:none}.has-warning .input-group-addon{border-color:#f39c12}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label,.has-error .form-control-feedback{color:#e74c3c}.has-error .form-control,.has-error .form-control:focus{-webkit-box-shadow:none;box-shadow:none}.has-error .input-group-addon{border-color:#e74c3c}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label,.has-success .form-control-feedback{color:#00bc8c}.has-success .form-control,.has-success .form-control:focus{-webkit-box-shadow:none;box-shadow:none}.has-success .input-group-addon{border-color:#00bc8c}.input-group-addon{color:#ffffff}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{border-color:#464545}.nav-tabs>li>a,.nav-pills>li>a{color:#fff}.pager a,.pager a:hover{color:#fff}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{background-color:#007053}.breadcrumb a{color:#fff}.close{text-decoration:none;text-shadow:none;opacity:0.4}.close:hover,.close:focus{opacity:1}.alert .alert-link{color:#fff;text-decoration:underline}.progress{height:10px;-webkit-box-shadow:none;box-shadow:none}.progress .progress-bar{font-size:10px;line-height:10px}.well{-webkit-box-shadow:none;box-shadow:none}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{border-color:#464545}a.list-group-item-success.active{background-color:#00bc8c}a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{background-color:#00a379}a.list-group-item-warning.active{background-color:#f39c12}a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{background-color:#e08e0b}a.list-group-item-danger.active{background-color:#e74c3c}a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{background-color:#e43725}.popover{color:#ffffff}.panel-default>.panel-heading{background-color:#464545} body { padding-top: 65px !important; } #mainNavBar .left-side{ padding-top: 12px; } #sidebar { margin-top: 60px !important; } ::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb{-webkit-box-shadow: inset 0 0 6px rgba(255,255,255,255.3) !important;} #myNavbar .select2-container{ color: #ffffff; background-color: #464545; border-color: #464545; } #myNavbar .select2-container:hover{ background-color: #2c2c2c; border-color: #272727; } #myNavbar .select2-selection{ height: 45px; } +#rightLoginButton{ + height: 45px; + padding: 10px 15px !important; +} #rightProfileButton > img{ height: 45px !important; width: 45px !important; max-height: 45px !important; max-width: 45px !important; } #mainNavBar div.navbar-header.pull-right > ul > li > div > ul.dropdown-menu-right{ margin-top: 12px; } #mainNavBar div.navbar-header.pull-right{ width: 50px; margin: 0 5px; +} +th a, .select2-container--default span{ + color: #FFF !important; +} +th:hover, .select2-dropdown{ + background-color: #111 !important; } \ No newline at end of file diff --git a/view/css/custom/netflix.css b/view/css/custom/netflix.css index b644d69a6..fe022061b 100644 --- a/view/css/custom/netflix.css +++ b/view/css/custom/netflix.css @@ -1,30 +1,29 @@ /*! * bootswatch v3.3.7 * Homepage: http://bootswatch.com * Copyright 2012-2016 Thomas Park * Licensed under MIT * Based on Bootstrap *//*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#c8c8c8;background-color:#141414}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#ffffff;text-decoration:none}a:hover,a:focus{color:#ffffff;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #1c1e22}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#7a8288}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{background-color:#f89406;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#7a8288}.text-primary{color:#7a8288}a.text-primary:hover,a.text-primary:focus{color:#62686d}.text-success{color:#ffffff}a.text-success:hover,a.text-success:focus{color:#e6e6e6}.text-info{color:#ffffff}a.text-info:hover,a.text-info:focus{color:#e6e6e6}.text-warning{color:#ffffff}a.text-warning:hover,a.text-warning:focus{color:#e6e6e6}.text-danger{color:#ffffff}a.text-danger:hover,a.text-danger:focus{color:#e6e6e6}.bg-primary{color:#fff;background-color:#7a8288}a.bg-primary:hover,a.bg-primary:focus{background-color:#62686d}.bg-success{background-color:#62c462}a.bg-success:hover,a.bg-success:focus{background-color:#42b142}.bg-info{background-color:#5bc0de}a.bg-info:hover,a.bg-info:focus{background-color:#31b0d5}.bg-warning{background-color:#f89406}a.bg-warning:hover,a.bg-warning:focus{background-color:#c67605}.bg-danger{background-color:#ee5f5b}a.bg-danger:hover,a.bg-danger:focus{background-color:#e9322d}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #1c1e22}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #7a8288}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #7a8288}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#7a8288}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #7a8288;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#141414;background-color:#f5f5f5;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:#2e3338}caption{padding-top:8px;padding-bottom:8px;color:#7a8288;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #1c1e22}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #1c1e22}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #1c1e22}.table .table{background-color:#141414}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #1c1e22}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #1c1e22}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#353a41}.table-hover>tbody>tr:hover{background-color:#49515a}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#49515a}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#3e444c}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#62c462}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#4fbd4f}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#5bc0de}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#46b8da}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#f89406}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#df8505}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#ee5f5b}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ec4844}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #1c1e22}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#c8c8c8;border:0;border-bottom:1px solid #1c1e22}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:9px;font-size:14px;line-height:1.42857143;color:#141414}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.42857143;color:#141414;background-color:#ffffff;background-image:none;border:1px solid #000000;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control::-moz-placeholder{color:#7a8288;opacity:1}.form-control:-ms-input-placeholder{color:#7a8288}.form-control::-webkit-input-placeholder{color:#7a8288}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#999999;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:38px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:30px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:54px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:9px;padding-bottom:9px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:54px;line-height:54px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:54px;line-height:54px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:54px;min-height:38px;padding:15px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:47.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:54px;height:54px;line-height:54px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#ffffff}.has-success .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-success .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#62c462}.has-success .form-control-feedback{color:#ffffff}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#ffffff}.has-warning .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-warning .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#f89406}.has-warning .form-control-feedback{color:#ffffff}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#ffffff}.has-error .form-control{border-color:#ffffff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#e6e6e6;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #fff}.has-error .input-group-addon{color:#ffffff;border-color:#ffffff;background-color:#ee5f5b}.has-error .form-control-feedback{color:#ffffff}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#ffffff}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:9px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:29px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:9px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:15px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:8px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#ffffff;background-color:#141414;border-color:#141414}.btn-default:focus,.btn-default.focus{color:#ffffff;background-color:#232628;border-color:#000000}.btn-default:hover{color:#ffffff;background-color:#232628;border-color:#1e2023}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#232628;border-color:#1e2023}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#ffffff;background-color:#121415;border-color:#000000}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#141414;border-color:#141414}.btn-default .badge{color:#141414;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#7a8288;border-color:#7a8288}.btn-primary:focus,.btn-primary.focus{color:#ffffff;background-color:#62686d;border-color:#3e4245}.btn-primary:hover{color:#ffffff;background-color:#62686d;border-color:#5d6368}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#62686d;border-color:#5d6368}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#51565a;border-color:#3e4245}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#7a8288;border-color:#7a8288}.btn-primary .badge{color:#7a8288;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#62c462;border-color:#62c462}.btn-success:focus,.btn-success.focus{color:#ffffff;background-color:#42b142;border-color:#2d792d}.btn-success:hover{color:#ffffff;background-color:#42b142;border-color:#40a940}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#42b142;border-color:#40a940}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#ffffff;background-color:#399739;border-color:#2d792d}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#62c462;border-color:#62c462}.btn-success .badge{color:#62c462;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#5bc0de;border-color:#5bc0de}.btn-info:focus,.btn-info.focus{color:#ffffff;background-color:#31b0d5;border-color:#1f7e9a}.btn-info:hover{color:#ffffff;background-color:#31b0d5;border-color:#2aabd2}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#31b0d5;border-color:#2aabd2}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#ffffff;background-color:#269abc;border-color:#1f7e9a}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#5bc0de;border-color:#5bc0de}.btn-info .badge{color:#5bc0de;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#f89406;border-color:#f89406}.btn-warning:focus,.btn-warning.focus{color:#ffffff;background-color:#c67605;border-color:#7c4a03}.btn-warning:hover{color:#ffffff;background-color:#c67605;border-color:#bc7005}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#c67605;border-color:#bc7005}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#ffffff;background-color:#a36104;border-color:#7c4a03}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#f89406;border-color:#f89406}.btn-warning .badge{color:#f89406;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#ee5f5b;border-color:#ee5f5b}.btn-danger:focus,.btn-danger.focus{color:#ffffff;background-color:#e9322d;border-color:#b71713}.btn-danger:hover{color:#ffffff;background-color:#e9322d;border-color:#e82924}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#e9322d;border-color:#e82924}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#dc1c17;border-color:#b71713}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#ee5f5b;border-color:#ee5f5b}.btn-danger .badge{color:#ee5f5b;background-color:#ffffff}.btn-link{color:#ffffff;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#ffffff;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#7a8288;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#141414;border:1px solid #141414;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#141414}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#c8c8c8;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#141414}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#141414}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#7a8288}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#7a8288;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:54px;line-height:54px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1;color:#141414;text-align:center;background-color:#141414;border:1px solid rgba(0,0,0,0.6);border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#3e444c}.nav>li.disabled>a{color:#7a8288}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#7a8288;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#3e444c;border-color:#ffffff}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #1c1e22}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#1c1e22 #1c1e22 #1c1e22}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#ffffff;background-color:#3e444c;border:1px solid #1c1e22;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #1c1e22}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #1c1e22;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#141414}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:transparent}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #1c1e22}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #1c1e22;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#141414}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:6px;margin-bottom:6px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#141414;border-color:#2b2e32}.navbar-default .navbar-brand{color:#c8c8c8}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-default .navbar-text{color:#c8c8c8}.navbar-default .navbar-nav>li>a{color:#c8c8c8}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#272b2e}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#272b2e}.navbar-default .navbar-toggle .icon-bar{background-color:#c8c8c8}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#2b2e32}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#272b2e;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#c8c8c8}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#272b2e}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#c8c8c8}.navbar-default .navbar-link:hover{color:#ffffff}.navbar-default .btn-link{color:#c8c8c8}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#ffffff}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#7a8288;border-color:#62686d}.navbar-inverse .navbar-brand{color:#cccccc}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-inverse .navbar-text{color:#cccccc}.navbar-inverse .navbar-nav>li>a{color:#cccccc}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#5d6368}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#5d6368}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#697075}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#5d6368;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#62686d}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#62686d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#cccccc}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#5d6368}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#cccccc}.navbar-inverse .navbar-link:hover{color:#ffffff}.navbar-inverse .btn-link{color:#cccccc}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#ffffff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:transparent;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#7a8288}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:8px 12px;line-height:1.42857143;text-decoration:none;color:#ffffff;background-color:#141414;border:1px solid rgba(0,0,0,0.6);margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#ffffff;background-color:transparent;border-color:rgba(0,0,0,0.6)}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#ffffff;background-color:#232628;border-color:rgba(0,0,0,0.6);cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#7a8288;background-color:#ffffff;border-color:rgba(0,0,0,0.6);cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:14px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#141414;border:1px solid rgba(0,0,0,0.6);border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:transparent}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#7a8288;background-color:#141414;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#141414}.label-default[href]:hover,.label-default[href]:focus{background-color:#232628}.label-primary{background-color:#7a8288}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#62686d}.label-success{background-color:#62c462}.label-success[href]:hover,.label-success[href]:focus{background-color:#42b142}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f89406}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#c67605}.label-danger{background-color:#ee5f5b}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#e9322d}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#7a8288;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#ffffff;background-color:#7a8288}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#1c1e22}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#050506}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#ffffff}.thumbnail .caption{padding:9px;color:#c8c8c8}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#62c462;border-color:#62bd4f;color:#ffffff}.alert-success hr{border-top-color:#55b142}.alert-success .alert-link{color:#e6e6e6}.alert-info{background-color:#5bc0de;border-color:#3dced8;color:#ffffff}.alert-info hr{border-top-color:#2ac7d2}.alert-info .alert-link{color:#e6e6e6}.alert-warning{background-color:#f89406;border-color:#e96506;color:#ffffff}.alert-warning hr{border-top-color:#d05a05}.alert-warning .alert-link{color:#e6e6e6}.alert-danger{background-color:#ee5f5b;border-color:#ed4d63;color:#ffffff}.alert-danger hr{border-top-color:#ea364f}.alert-danger .alert-link{color:#e6e6e6}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#1c1e22;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#ffffff;text-align:center;background-color:#7a8288;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#62c462}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f89406}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#ee5f5b}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#32383e;border:1px solid rgba(0,0,0,0.6)}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#c8c8c8}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#ffffff}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{text-decoration:none;color:#c8c8c8;background-color:#3e444c}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#999999;color:#7a8288;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#7a8288}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#3e444c;border-color:rgba(0,0,0,0.6)}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#a2aab4}.list-group-item-success{color:#ffffff;background-color:#62c462}a.list-group-item-success,button.list-group-item-success{color:#ffffff}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#ffffff;background-color:#4fbd4f}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-info{color:#ffffff;background-color:#5bc0de}a.list-group-item-info,button.list-group-item-info{color:#ffffff}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#ffffff;background-color:#46b8da}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-warning{color:#ffffff;background-color:#f89406}a.list-group-item-warning,button.list-group-item-warning{color:#ffffff}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#ffffff;background-color:#df8505}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-danger{color:#ffffff;background-color:#ee5f5b}a.list-group-item-danger,button.list-group-item-danger{color:#ffffff}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#ffffff;background-color:#ec4844}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#ffffff;border-color:#ffffff}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#2e3338;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#3e444c;border-top:1px solid rgba(0,0,0,0.6);border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #1c1e22}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid rgba(0,0,0,0.6)}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid rgba(0,0,0,0.6)}.panel-default{border-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading{color:#c8c8c8;background-color:#3e444c;border-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-default>.panel-heading .badge{color:#3e444c;background-color:#c8c8c8}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-primary{border-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading{color:#ffffff;background-color:#7a8288;border-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-primary>.panel-heading .badge{color:#7a8288;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-success{border-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading{color:#ffffff;background-color:#62c462;border-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-success>.panel-heading .badge{color:#62c462;background-color:#ffffff}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-info{border-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading{color:#ffffff;background-color:#5bc0de;border-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-info>.panel-heading .badge{color:#5bc0de;background-color:#ffffff}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-warning{border-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading{color:#ffffff;background-color:#f89406;border-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-warning>.panel-heading .badge{color:#f89406;background-color:#ffffff}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.panel-danger{border-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading{color:#ffffff;background-color:#ee5f5b;border-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:rgba(0,0,0,0.6)}.panel-danger>.panel-heading .badge{color:#ee5f5b;background-color:#ffffff}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:rgba(0,0,0,0.6)}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#1c1e22;border:1px solid #0c0d0e;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#2e3338;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #1c1e22}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #1c1e22}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;background-color:#000000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#2e3338;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#2e3338;border-bottom:1px solid #22262a;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#666666;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#2e3338}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#666666;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#2e3338}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#666666;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#2e3338}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#666666;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#2e3338;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar-default,.navbar-inverse{border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}@media (min-width:768px){.navbar-default .navbar-nav>li>a,.navbar-inverse .navbar-nav>li>a{border-right:1px solid rgba(0,0,0,0.2);border-left:1px solid rgba(255,255,255,0.1)}.navbar-default .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:hover{border-left-color:transparent}.navbar-default .nav .open>a,.navbar-inverse .nav .open>a{border-color:transparent}.navbar-default .navbar-nav>li.active>a,.navbar-inverse .navbar-nav>li.active>a{border-left-color:transparent}.navbar-default .navbar-form,.navbar-inverse .navbar-form{margin-left:5px;margin-right:5px}}.navbar-default{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#141414), color-stop(60%, #090909), to(#141414));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.navbar-default .navbar-nav>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none}.navbar-inverse{background-image:-webkit-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-o-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-webkit-gradient(linear, left top, left bottom, from(#8a9196), color-stop(60%, #7a8288), to(#70787d));background-image:linear-gradient(#8a9196, #7a8288 60%, #70787d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8a9196', endColorstr='#ff70787d', GradientType=0);-webkit-filter:none;filter:none}.navbar-inverse .badge{background-color:#5d6368}.navbar-inverse .navbar-nav>li>a:hover{background-image:-webkit-linear-gradient(#404448, #4e5458 40%, #53595d);background-image:-o-linear-gradient(#404448, #4e5458 40%, #53595d);background-image:-webkit-gradient(linear, left top, left bottom, from(#404448), color-stop(40%, #4e5458), to(#53595d));background-image:linear-gradient(#404448, #4e5458 40%, #53595d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff404448', endColorstr='#ff53595d', GradientType=0);-webkit-filter:none;filter:none}.btn,.btn:hover{border-color:rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.btn-default{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.btn-default:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none}.btn-primary{background-image:-webkit-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-o-linear-gradient(#8a9196, #7a8288 60%, #70787d);background-image:-webkit-gradient(linear, left top, left bottom, from(#8a9196), color-stop(60%, #7a8288), to(#70787d));background-image:linear-gradient(#8a9196, #7a8288 60%, #70787d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8a9196', endColorstr='#ff70787d', GradientType=0);-webkit-filter:none;filter:none}.btn-primary:hover{background-image:-webkit-linear-gradient(#404448, #4e5458 40%, #53595d);background-image:-o-linear-gradient(#404448, #4e5458 40%, #53595d);background-image:-webkit-gradient(linear, left top, left bottom, from(#404448), color-stop(40%, #4e5458), to(#53595d));background-image:linear-gradient(#404448, #4e5458 40%, #53595d);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff404448', endColorstr='#ff53595d', GradientType=0);-webkit-filter:none;filter:none}.btn-success{background-image:-webkit-linear-gradient(#78cc78, #62c462 60%, #53be53);background-image:-o-linear-gradient(#78cc78, #62c462 60%, #53be53);background-image:-webkit-gradient(linear, left top, left bottom, from(#78cc78), color-stop(60%, #62c462), to(#53be53));background-image:linear-gradient(#78cc78, #62c462 60%, #53be53);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff78cc78', endColorstr='#ff53be53', GradientType=0);-webkit-filter:none;filter:none}.btn-success:hover{background-image:-webkit-linear-gradient(#2f7d2f, #379337 40%, #3a9a3a);background-image:-o-linear-gradient(#2f7d2f, #379337 40%, #3a9a3a);background-image:-webkit-gradient(linear, left top, left bottom, from(#2f7d2f), color-stop(40%, #379337), to(#3a9a3a));background-image:linear-gradient(#2f7d2f, #379337 40%, #3a9a3a);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f7d2f', endColorstr='#ff3a9a3a', GradientType=0);-webkit-filter:none;filter:none}.btn-info{background-image:-webkit-linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-image:-o-linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-image:-webkit-gradient(linear, left top, left bottom, from(#74cae3), color-stop(60%, #5bc0de), to(#4ab9db));background-image:linear-gradient(#74cae3, #5bc0de 60%, #4ab9db);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff74cae3', endColorstr='#ff4ab9db', GradientType=0);-webkit-filter:none;filter:none}.btn-info:hover{background-image:-webkit-linear-gradient(#20829f, #2596b8 40%, #279dc1);background-image:-o-linear-gradient(#20829f, #2596b8 40%, #279dc1);background-image:-webkit-gradient(linear, left top, left bottom, from(#20829f), color-stop(40%, #2596b8), to(#279dc1));background-image:linear-gradient(#20829f, #2596b8 40%, #279dc1);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff20829f', endColorstr='#ff279dc1', GradientType=0);-webkit-filter:none;filter:none}.btn-warning{background-image:-webkit-linear-gradient(#faa123, #f89406 60%, #e48806);background-image:-o-linear-gradient(#faa123, #f89406 60%, #e48806);background-image:-webkit-gradient(linear, left top, left bottom, from(#faa123), color-stop(60%, #f89406), to(#e48806));background-image:linear-gradient(#faa123, #f89406 60%, #e48806);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffaa123', endColorstr='#ffe48806', GradientType=0);-webkit-filter:none;filter:none}.btn-warning:hover{background-image:-webkit-linear-gradient(#804d03, #9e5f04 40%, #a86404);background-image:-o-linear-gradient(#804d03, #9e5f04 40%, #a86404);background-image:-webkit-gradient(linear, left top, left bottom, from(#804d03), color-stop(40%, #9e5f04), to(#a86404));background-image:linear-gradient(#804d03, #9e5f04 40%, #a86404);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff804d03', endColorstr='#ffa86404', GradientType=0);-webkit-filter:none;filter:none}.btn-danger{background-image:-webkit-linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-image:-o-linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-image:-webkit-gradient(linear, left top, left bottom, from(#f17a77), color-stop(60%, #ee5f5b), to(#ec4d49));background-image:linear-gradient(#f17a77, #ee5f5b 60%, #ec4d49);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff17a77', endColorstr='#ffec4d49', GradientType=0);-webkit-filter:none;filter:none}.btn-danger:hover{background-image:-webkit-linear-gradient(#bb1813, #d71c16 40%, #e01d17);background-image:-o-linear-gradient(#bb1813, #d71c16 40%, #e01d17);background-image:-webkit-gradient(linear, left top, left bottom, from(#bb1813), color-stop(40%, #d71c16), to(#e01d17));background-image:linear-gradient(#bb1813, #d71c16 40%, #e01d17);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbb1813', endColorstr='#ffe01d17', GradientType=0);-webkit-filter:none;filter:none}.btn-link,.btn-link:hover{border-color:transparent}h1,h2,h3,h4,h5,h6{text-shadow:-1px -1px 0 rgba(0,0,0,0.3)}.text-primary,.text-primary:hover{color:#7a8288}.text-success,.text-success:hover{color:#62c462}.text-danger,.text-danger:hover{color:#ee5f5b}.text-warning,.text-warning:hover{color:#f89406}.text-info,.text-info:hover{color:#5bc0de}.table .success,.table .warning,.table .danger,.table .info{color:#fff}.table-bordered tbody tr.success td,.table-bordered tbody tr.warning td,.table-bordered tbody tr.danger td,.table-bordered tbody tr.success:hover td,.table-bordered tbody tr.warning:hover td,.table-bordered tbody tr.danger:hover td{border-color:#1c1e22}.table-responsive>.table{background-color:#2e3338}input,textarea{color:#141414}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label,.has-warning .form-control-feedback{color:#f89406}.has-warning .form-control,.has-warning .form-control:focus{border-color:#f89406}.has-warning .input-group-addon{border-color:rgba(0,0,0,0.6)}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label,.has-error .form-control-feedback{color:#ee5f5b}.has-error .form-control,.has-error .form-control:focus{border-color:#ee5f5b}.has-error .input-group-addon{border-color:rgba(0,0,0,0.6)}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label,.has-success .form-control-feedback{color:#62c462}.has-success .form-control,.has-success .form-control:focus{border-color:#62c462}.has-success .input-group-addon{border-color:rgba(0,0,0,0.6)}legend{color:#fff}.input-group-addon{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;text-shadow:1px 1px 1px rgba(0,0,0,0.3);color:#ffffff}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{border-color:rgba(0,0,0,0.6)}.nav-pills>li>a{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.nav-pills>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6)}.nav-pills>li.active>a,.nav-pills>li.active>a:hover{background-color:none;background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none;border:1px solid rgba(0,0,0,0.6)}.nav-pills>li.disabled>a,.nav-pills>li.disabled>a:hover{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pagination>li>a,.pagination>li>span{text-shadow:1px 1px 1px rgba(0,0,0,0.3);background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pagination>li>a:hover,.pagination>li>span:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none}.pagination>li.active>a,.pagination>li.active>span{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none}.pagination>li.disabled>a,.pagination>li.disabled>a:hover,.pagination>li.disabled>span,.pagination>li.disabled>span:hover{background-color:transparent;background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.pager>li>a{background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none;text-shadow:1px 1px 1px rgba(0,0,0,0.3)}.pager>li>a:hover{background-image:-webkit-linear-gradient(#020202, #101112 40%, #141618);background-image:-o-linear-gradient(#020202, #101112 40%, #141618);background-image:-webkit-gradient(linear, left top, left bottom, from(#020202), color-stop(40%, #101112), to(#141618));background-image:linear-gradient(#020202, #101112 40%, #141618);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff020202', endColorstr='#ff141618', GradientType=0);-webkit-filter:none;filter:none}.pager>li.disabled>a,.pager>li.disabled>a:hover{background-color:transparent;background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.breadcrumb{border:1px solid rgba(0,0,0,0.6);text-shadow:1px 1px 1px rgba(0,0,0,0.3);background-image:-webkit-linear-gradient(#101010, #141414 60%, #090909);background-image:-o-linear-gradient(#101010, #141414 60%, #090909);background-image:-webkit-gradient(linear, left top, left bottom, from(#101010), color-stop(60%, #141414), to(#090909));background-image:linear-gradient(#101010, #141414 60%, #090909);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff484e55', endColorstr='#ff313539', GradientType=0);-webkit-filter:none;filter:none}.alert .alert-link,.alert a{color:#fff;text-decoration:underline}.alert .close{color:#000000;text-decoration:none}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#0c0d0e}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{border-color:rgba(0,0,0,0.6)}a.list-group-item-success.active{background-color:#62c462}a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{background-color:#4fbd4f}a.list-group-item-warning.active{background-color:#f89406}a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{background-color:#df8505}a.list-group-item-danger.active{background-color:#ee5f5b}a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{background-color:#ec4844}.jumbotron{border:1px solid rgba(0,0,0,0.6)}.panel-primary .panel-heading,.panel-success .panel-heading,.panel-danger .panel-heading,.panel-warning .panel-heading,.panel-info .panel-heading{border-color:#000} - .bootgrid-table th > .column-header-anchor { - color: #EEE; -} - -.bootgrid-table th:hover, .bootgrid-table th:active { - background: #555; -} - .form-control { color: #EEE; background-color: #555; } -.webui-popover { - background-color: #333; +.webui-popover, .select2-container--default .select2-results__option--selected { + background-color: #333 !important; +} +::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb{-webkit-box-shadow: inset 0 0 6px rgba(255,255,255,255.3) !important;} + +th a, .select2-container--default span{ + color: #FFF !important; } -::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb{-webkit-box-shadow: inset 0 0 6px rgba(255,255,255,255.3) !important;} \ No newline at end of file +th:hover, .select2-dropdown{ + background-color: #111 !important; +} \ No newline at end of file diff --git a/view/include/article.php b/view/include/article.php index 451a106d4..0635faa07 100644 --- a/view/include/article.php +++ b/view/include/article.php @@ -1,62 +1,46 @@

- -
- - Logo - -
- -
diff --git a/view/include/image.php b/view/include/image.php index 82c87ff46..cef346b9d 100644 --- a/view/include/image.php +++ b/view/include/image.php @@ -1,53 +1,38 @@
" class="img img-responsive" style="max-height: 600px;" >
- -
- - Logo - -
-
diff --git a/view/include/pdf.php b/view/include/pdf.php index 7b5c9922c..d207e8379 100644 --- a/view/include/pdf.php +++ b/view/include/pdf.php @@ -1,53 +1,38 @@
- -
- - Logo - -
-
diff --git a/view/include/zip.php b/view/include/zip.php index 60cd125a1..f7ed2f538 100644 --- a/view/include/zip.php +++ b/view/include/zip.php @@ -1,68 +1,53 @@
    open($sources['zip']["path"]); for ($i = 0; $i < $za->numFiles; $i++) { $stat = $za->statIndex($i); $fname = basename($stat['name']); ?>
- -
- - Logo - -
-
diff --git a/view/managerCategories_body.php b/view/managerCategories_body.php index ab3924905..569371221 100644 --- a/view/managerCategories_body.php +++ b/view/managerCategories_body.php @@ -1,405 +1,413 @@
- + +
\ No newline at end of file diff --git a/view/modeYoutube.php b/view/modeYoutube.php index d7f08c465..6468a21c3 100644 --- a/view/modeYoutube.php +++ b/view/modeYoutube.php @@ -1,483 +1,455 @@ thumbnails; $poster = $evideo->thumbnails; $imgw = 1280; $imgh = 720; $autoPlaySources = array(); $autoPlayURL = ''; $autoPlayPoster = ''; $autoPlayThumbsSprit = ''; } else { require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/category.php'; require_once $global['systemRootPath'] . 'objects/subscribe.php'; require_once $global['systemRootPath'] . 'objects/functions.php'; $img = "".getCDN()."view/img/notfound.jpg"; $poster = "".getCDN()."view/img/notfound.jpg"; $imgw = 1280; $imgh = 720; if (!empty($_GET['type'])) { if ($_GET['type'] == 'audio') { $_SESSION['type'] = 'audio'; } else if ($_GET['type'] == 'video') { $_SESSION['type'] = 'video'; } else if ($_GET['type'] == 'pdf') { $_SESSION['type'] = 'pdf'; } else { $_SESSION['type'] = ""; unset($_SESSION['type']); } } else { unset($_SESSION['type']); } session_write_close(); $modeYouTubeTimeLog['Code part 1'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($_GET['playlist_id'])) { $isSerie = 1; if (preg_match("/^[0-9]+$/", $_GET['playlist_id'])) { $playlist_id = $_GET['playlist_id']; } else if (User::isLogged()) { if ($_GET['playlist_id'] == "favorite") { $playlist_id = PlayList::getFavoriteIdFromUser(User::getId()); } else { $playlist_id = PlayList::getWatchLaterIdFromUser(User::getId()); } } if (!empty($_GET['playlist_index'])) { $playlist_index = $_GET['playlist_index']; } $videosArrayId = PlayList::getVideosIdFromPlaylist($playlist_id); if (empty($videosArrayId)) { videoNotFound(__('Playlist is empty or does not exist')); } $videosPlayList = Video::getAllVideos("viewable", false, false, $videosArrayId, false, true); $videosPlayList = PlayList::sortVideos($videosPlayList, $videosArrayId); $videoSerie = Video::getVideoFromSeriePlayListsId($playlist_id); unset($_GET['playlist_id']); $isPlayListTrailer = false; $playListObject = AVideoPlugin::getObjectData("PlayLists"); if (!empty($videoSerie)) { $videoSerie = Video::getVideo($videoSerie["id"], "", true); if (!empty($playListObject->showTrailerInThePlayList) && !empty($videoSerie["trailer1"]) && filter_var($videoSerie["trailer1"], FILTER_VALIDATE_URL) !== FALSE) { $videoSerie["type"] = "embed"; $videoSerie["videoLink"] = $videoSerie["trailer1"]; array_unshift($videosPlayList, $videoSerie); array_unshift($videosArrayId, $videoSerie['id']); $isPlayListTrailer = true; } } if (empty($playlist_index) && $isPlayListTrailer) { $video = $videoSerie; } else { $vid = new Video("", "", $videosPlayList[$playlist_index]['id']); $_GET['videoName'] = $vid->getClean_title(); $video = Video::getVideo($videosPlayList[$playlist_index]['id'], "viewable", false, false, false, true); } if (!empty($videosPlayList[$playlist_index + 1])) { $autoPlayVideo = Video::getVideo($videosPlayList[$playlist_index + 1]['id'], "viewableNotUnlisted", false, false, false, true); $autoPlayVideo['url'] = $global['webSiteRootURL'] . "playlist/{$playlist_id}/" . ($playlist_index + 1); } else if (!empty($videosPlayList[0])) { $autoPlayVideo = Video::getVideo($videosPlayList[0]['id'], "viewableNotUnlisted", false, false, false, true); $autoPlayVideo['url'] = $global['webSiteRootURL'] . "playlist/{$playlist_id}/0"; } if ($serie = PlayLists::isPlayListASerie($playlist_id)) { setVideos_id($serie['id']); } else if (!empty($videosPlayList[$playlist_index])) { setVideos_id($videosPlayList[$playlist_index]['id']); } } else { $catLink = ""; if (!empty($_GET['catName'])) { $catLink = "cat/{$_GET['catName']}/"; } // add this because if you change the video category the video was not loading anymore $catName = @$_GET['catName']; if (empty($_GET['clean_title']) && (isset($advancedCustom->forceCategory) && $advancedCustom->forceCategory === false)) { $_GET['catName'] = ""; } if (empty($video)) { $video = Video::getVideo("", "viewable", false, false, true, true); } if (empty($video)) { $video = Video::getVideo("", "viewable", false, false, false, true); } if (empty($video)) { $video = AVideoPlugin::getVideo(); } if (!empty($_GET['v']) && (empty($video) || $video['id'] != $_GET['v'])) { $video = false; } if (!empty($video['id'])) { // allow users to count a view again in case it is refreshed Video::unsetAddView($video['id']); // add this because if you change the video category the video was not loading anymore $_GET['catName'] = $catName; $_GET['isMediaPlaySite'] = $video['id']; $obj = new Video("", "", $video['id']); } /* if (empty($_SESSION['type'])) { $_SESSION['type'] = $video['type']; } * */ // $resp = $obj->addView(); $get = array('channelName' => @$_GET['channelName'], 'catName' => @$_GET['catName']); $modeYouTubeTimeLog['Code part 1.1'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($video['next_videos_id'])) { $modeYouTubeTimeLog['Code part 1.2'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); $autoPlayVideo = Video::getVideo($video['next_videos_id']); } else { $modeYouTubeTimeLog['Code part 1.3'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); - /* - if ($video['category_order'] == 1) { - $modeYouTubeTimeLog['Code part 1.4'] = microtime(true)-$modeYouTubeTime; - $modeYouTubeTime = microtime(true); - unset($_POST['sort']); - $category = Category::getAllCategories(); - $_POST['sort']['title'] = "ASC"; - - $modeYouTubeTimeLog['Code part 1.4.1'] = microtime(true)-$modeYouTubeTime; - $modeYouTubeTime = microtime(true); - // maybe there's a more slim method? - $videos = Video::getAllVideos(); - $videoFound = false; - $autoPlayVideo; - foreach ($videos as $value) { - if ($videoFound) { - $autoPlayVideo = $value; - break; - } - - if ($value['id'] == $video['id']) { - // if the video is found, make another round to have the next video properly. - $videoFound = true; - } - } - } else { - * - */ $modeYouTubeTimeLog['Code part 1.5'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($video['id'])) { $autoPlayVideo = Video::getRandom($video['id']); } //} } $modeYouTubeTimeLog['Code part 1.6'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($autoPlayVideo)) { $name2 = User::getNameIdentificationById($autoPlayVideo['users_id']) . ' ' . User::getEmailVerifiedIcon($autoPlayVideo['users_id']); $autoPlayVideo['creator'] = '
User Photo
' . $name2 . ' ' . humanTiming(strtotime($autoPlayVideo['videoCreation'])) . '
'; $autoPlayVideo['tags'] = Video::getTags($autoPlayVideo['id']); //$autoPlayVideo['url'] = $global['webSiteRootURL'] . $catLink . "video/" . $autoPlayVideo['clean_title']; $autoPlayVideo['url'] = Video::getLink($autoPlayVideo['id'], $autoPlayVideo['clean_title'], false, $get); } } $modeYouTubeTimeLog['Code part 2'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($video)) { $name = User::getNameIdentificationById($video['users_id']); $name = "{$name} " . User::getEmailVerifiedIcon($video['users_id']) . ""; $subscribe = Subscribe::getButton($video['users_id']); $video['creator'] = '
User Photo
' . $name . '
' . $subscribe . '
' . humanTiming(strtotime($video['videoCreation'])) . '
'; $obj = new Video("", "", $video['id']); // Don't need because have an embedded video on this page // $resp = $obj->addView(); } if (!empty($video) && $video['type'] == "video") { $poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg"; } else { $poster = "".getCDN()."view/img/audio_wave.jpg"; } if (!empty($video)) { $source = Video::getSourceFile($video['filename']); if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio") && !empty($source['url'])) { $img = $source['url']; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } else if ($video['type'] == "audio") { $img = "".getCDN()."view/img/audio_wave.jpg"; } $type = 'video'; if ($video['type'] === 'pdf') { $type = 'pdf'; } else if ($video['type'] === 'zip') { $type = 'zip'; } else if ($video['type'] === 'article') { $type = 'article'; } $images = Video::getImageFromFilename($video['filename'], $type); $poster = isMobile() ? $images->thumbsJpg : $images->poster; if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') { $img = $images->posterPortrait; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } else { $img = isMobile() ? $images->thumbsJpg : $images->poster; } } else { $poster = "".getCDN()."view/img/notfound.jpg"; } $objSecure = AVideoPlugin::getObjectDataIfEnabled('SecureVideosDirectory'); $modeYouTubeTimeLog['Code part 3'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($autoPlayVideo) && !empty($autoPlayVideo['filename'])) { $autoPlaySources = getSources($autoPlayVideo['filename'], true); $autoPlayURL = $autoPlayVideo['url']; $autoPlayPoster = "{$global['webSiteRootURL']}videos/{$autoPlayVideo['filename']}.jpg"; $autoPlayThumbsSprit = "{$global['webSiteRootURL']}videos/{$autoPlayVideo['filename']}_thumbsSprit.jpg"; } else { $autoPlaySources = array(); $autoPlayURL = ''; $autoPlayPoster = ''; $autoPlayThumbsSprit = ""; } if (empty($_GET['videoName']) && !empty($video)) { $_GET['videoName'] = $video['clean_title']; } if(!empty($_GET['videoName'])){ $v = Video::getVideoFromCleanTitle($_GET['videoName']); } if (empty($v) && empty($videosPlayList[$playlist_index]['id'])) { videoNotFound(""); } else { $modeYouTubeTimeLog['Code part 4'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); AVideoPlugin::getModeYouTube($v['id']); $modeYouTubeTimeLog['Code part 5'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (empty($video)) { header('HTTP/1.0 404 Not Found', true, 404); } $modeYouTubeTimeLog['Code part 6'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); } } // video not found if (empty($video)) { $img = "".getCDN()."view/img/this-video-is-not-available.jpg"; $poster = "".getCDN()."view/img/this-video-is-not-available.jpg"; $imgw = 1280; $imgh = 720; unset($_SESSION['type']); session_write_close(); $video = array(); $video['id'] = 0; $video['type'] = 'notfound'; $video['rotation'] = 0; $video['videoLink'] = ""; $video['title'] = __("Video Not Available"); $video['clean_title'] = "video-not-available"; $video['description'] = ""; $video['duration'] = ""; $video['creator'] = ""; $video['likes'] = ""; $video['dislikes'] = ""; $video['category'] = "embed"; $video['views_count'] = 0; $video['filename'] = ""; header('HTTP/1.0 404 Not Found', true, 404); } $metaDescription = " {$video['id']}"; // make sure the title tag does not have more then 70 chars $titleTag = $video['title']; $titleTag = (strlen($titleTag) > 50) ? (substr($titleTag, 0, 48) . " …") : $titleTag; $titleTag .= getSEOComplement(array("allowedTypes" => array("audio", "video", "pdf"))) . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); $titleTag = (strlen($titleTag) > 70) ? (substr($titleTag, 0, 68) . " …") : $titleTag; if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) { $video['type'] = "blockedUser"; } ?> <?php echo $titleTag; ?> showChannelBannerOnModeYoutube)) { ?>




! videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.
disableYoutubePlayerIntegration; } else { $disableYoutubeIntegration = false; } if ((isset($_GET['isEmbedded'])) && ($disableYoutubeIntegration == false)) { if ($_GET['isEmbedded'] == "y") { ?> $value) { if ($value > 0.5) { echo "*** "; } echo "{$key} = {$value} seconds \n"; } echo "\n -->"; ?> diff --git a/view/videoEmbeded.php b/view/videoEmbeded.php index 4c0d5c7ef..cfab8536d 100644 --- a/view/videoEmbeded.php +++ b/view/videoEmbeded.php @@ -1,591 +1,559 @@ thumbnails; $poster = $evideo->thumbnails; $imgw = 1280; $imgh = 720; $autoPlaySources = array(); $autoPlayURL = ''; $autoPlayPoster = ''; $autoPlayThumbsSprit = ''; } else if (!empty($_GET['v'])) { $video = Video::getVideo($_GET['v'], "", true, false, false, true); //$video['id'] = $_GET['v']; } else if (!empty($_GET['videoName'])) { $video = Video::getVideoFromCleanTitle($_GET['videoName']); } Video::unsetAddView($video['id']); AVideoPlugin::getEmbed($video['id']); if (empty($video)) { forbiddenPage("Video not found"); } if (empty($video['users_id'])) { $video['users_id'] = User::getId(); } if (empty($customizedAdvanced)) { $customizedAdvanced = AVideoPlugin::getObjectDataIfEnabled('CustomizeAdvanced'); } if (!isSameDomain(@$_SERVER['HTTP_REFERER'], $global['webSiteRootURL']) && !isAVideoMobileApp()) { if (!empty($advancedCustomUser->blockEmbedFromSharedVideos) && !CustomizeUser::canShareVideosFromVideo($video['id'])) { if (!empty($advancedCustomUser->blockEmbedFromSharedVideos)) { error_log("Embed is forbidden: \$advancedCustomUser->blockEmbedFromSharedVideos"); } if (!CustomizeUser::canShareVideosFromVideo($video['id'])) { error_log("Embed is forbidden: !CustomizeUser::canShareVideosFromVideo(\$video['id'])"); } forbiddenPage("Embed is forbidden"); } } $source = array(); $img = ""; $imgw = 1280; $imgh = 720; if ($video['type'] !== "pdf") { if (!empty($video['filename'])) { $source = Video::getSourceFile($video['filename']); $poster = $img = $source['url']; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } } if(empty($poster)){ $poster = ""; if (!empty($video['filename'])) { $images = Video::getImageFromFilename($video['filename']); $poster = $images->poster; if (!empty($images->posterPortrait)) { $img = $images->posterPortrait; $data = getimgsize($source['path']); $imgw = $data[0]; $imgh = $data[1]; } } else { $images = array(); $poster = ""; $imgw = 0; $imgh = 0; } if (empty($poster) && !empty($video['filename'])) { if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio")) { $poster = "{$global['webSiteRootURL']}videos/{$video['filename']}.jpg"; } else { $poster = "".getCDN()."view/img/audio_wave.jpg"; } } } require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php'; /* * Swap aspect ratio for rotated (vvs) videos if ($video['rotation'] === "90" || $video['rotation'] === "270") { $embedResponsiveClass = "embed-responsive-9by16"; $vjsClass = "vjs-9-16"; } else { $embedResponsiveClass = "embed-responsive-16by9"; $vjsClass = "vjs-16-9"; } */ $vjsClass = ""; $obj = new Video("", "", $video['id']); $resp = $obj->addView(); //https://.../vEmbed/527?modestbranding=1&showinfo=0&autoplay=1&controls=0&loop=1&mute=1&t=0 $modestbranding = false; $autoplay = false; $controls = "controls"; $loop = ""; $mute = ""; $objectFit = ""; $t = 0; if (isset($_GET['modestbranding']) && $_GET['modestbranding'] == "1") { $modestbranding = true; } if (!empty($_GET['autoplay']) || $config->getAutoplay()) { $autoplay = true; } if (isset($_GET['controls']) && $_GET['controls'] == "0") { $controls = ""; } if (!empty($_GET['loop'])) { $loop = "loop"; } if (!empty($_GET['mute'])) { $mute = 'muted="muted"'; } if (!empty($_GET['objectFit'])) { $objectFit = 'object-fit: ' . $_GET['objectFit']; } if (!empty($_GET['t'])) { $t = intval($_GET['t']); } else if (!empty($video['progress']['lastVideoTime'])) { $t = intval($video['progress']['lastVideoTime']); } else if (!empty($video['externalOptions']->videoStartSeconds)) { $t = parseDurationToSeconds($video['externalOptions']->videoStartSeconds); } $playerSkinsO = AVideoPlugin::getObjectData("PlayerSkins"); $disableEmbedTopInfo = $playerSkinsO->disableEmbedTopInfo; if (isset($_REQUEST['showinfo']) && empty($_REQUEST['showinfo'])) { $disableEmbedTopInfo = true; $modestbranding = true; } $url = Video::getLink($video['id'], $video['clean_title'], false); $title = str_replace('"', '', $video['title']) . ' - ' . $config->getWebSiteTitle(); $photo = User::getPhoto($video['users_id']); if (empty($currentTime)) { $currentTime = 0; } if (User::hasBlockedUser($video['users_id'])) { $disableEmbedTopInfo = true; $video['type'] = "blockedUser"; } ?> <?php echo $video['title'] . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?>


You've blocked user ()
You won't see any comments or videos from this user


" class="img img-responsive" style="height: 100%;" >
    open($sources['zip']["path"]); for ($i = 0; $i < $za->numFiles; $i++) { $stat = $za->statIndex($i); $fname = basename($stat['name']); ?>
-
- - Logo - -
- - - -
- - Logo - -
- -